Forum Discussion
How to filter a gallery by using buttons
Hi Patrick Rote, your IF-Logic maybe causing the unexpected, but logically the App is alright. At the first Runtime your logic can select from the filter criteria, but only from the first IF. The next, nested IF Funktion does not find any Data left then...
I would like to suggest, that your IF Logic can be simplified with the SWITCH (this OR This OR This OR That :)) Function,
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if
only an idea... With that function two filters can be reviewed at the same (run)time.
Another idea: you can nest your 2 variables in items of a criteria "collection" to choose from.
To get a very good introduction for free: Laura Rogers published to today an invitation to register for a powerapps free training day! I highly recommend her brilliant learning content to you, she explains it in an understanding manner: https://www.iwmentor.com/courses/powerapps-introduction
Hope that helps, Greets from Eva.
Can please give me of an example using the switch. I'm a bit novice to powerapps
- Eva VogelNov 09, 2020Steel Contributor
Hi Patrick Rote, I am sorry for this .
In fact translating is easy, when you look at microsofts hyperlinks: In the position of "de-de" of the URL you only have to replace it with "en-us", I adjusted this URL and you can now read in english. Never mind. I added you a useful link to learn more about PowerApps: The best content I fould so far is in Laura Rogers' Site, called iwmentor.com. You can follow her tons of videos from 2017 concerning Power Automate and PowerApps as well. She's the best. Enjoy learning, as i still do
Eva
- Patrick RoteNov 10, 2020Iron Contributor
Hi Eva Vogel
I tried the below using switch
Switch(varbtnInProgressTab, "New", Filter('ESC-Request','Event Status'= varbtnInProgressTab), "Complete", Filter('ESC-Request','Event Status'= varbtnCompleteTab))
But i had no luck.
It doesn't load anything by default(When i load the gallery initially)
When i click the In Progress button it works the first time and letter it doesn't work or refresh.What am i missing