Nov 09 2020 01:43 AM
Hi there,
I have 2 buttons
In Progress and Complete
I have set 2 variables
- varbtnCompleteTab and
-varbtnInProgressTab
I have set the variables like so on the button OnSelect
Set(varbtnInProgressTab,"New")
and Set(varbtnCompleteTab,"Complete")
On the items Gallery I have
If(varbtnCompleteTab = "Complete",
Filter('DataSource','Event Status'= varbtnCompleteTab),If(varbtnInProgressTab ="New",Filter('ESC-Request','Event Status'= varbtnInProgressTab)))
When i load the app and select the first button In Progress it filters and also the second one (Complete button).
My Problem :
But when i click it again it does nothing and also when i load the app the first time there is no data until i press the button?
What am i doing wrong?
Thanks
Nov 09 2020 01:56 AM - edited Nov 09 2020 02:36 AM
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.
Nov 09 2020 02:09 AM
Nov 09 2020 02:42 AM
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
Nov 09 2020 09:23 PM
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
Nov 10 2020 06:12 AM
Hi @Patrick Rote, sorry for late answer, am very busy... Theres a good video for you from April Dunham about Filtering a List in PowerApps with a Filter Button.
https://youtu.be/8bNCBe2wzYI?list=TLPQMTAxMTIwMjBDVerNQxedog&t=563
There are so many ways to filter, she knows them all 🙂
Have a good day,
Eva
Nov 11 2020 04:17 AM
Thanks @Eva Vogel for the videos
But there wasn't any example filtering gallery by using multiple buttons..
I think i'm close looking at my OP but just having issue combining multiple filters
Nov 12 2020 09:07 PM
Thanks @Eva Vogel I ended up using dropdown list instead of buttons.
It was clearer to me that using different buttons to filter...
Hope i get to see how its is being used soon
Nov 19 2020 05:38 AM
@Patrick Rote If you still require this you can try the following
you can set the Filter(Datasorcename, Progress = VarbtnInProgressTab, Complete = varbtnCompleteTab)