Hi All,
I'm new to PowerApps and try to filter a gallery based on a dropdown box. So i hope anyone can give me any suggestions.
Here's is what i'm trying to achieve :
OnStartUp :
Screen1 :
I created a gallery (galIcollection) and set the items property as :
collection1
I created a dropdownbox (rpSubjectFilter) where i've set the items property as : (showing unique values)
Sort(Distinct(collection1Filter.Onderwerp;Onderwerp);Result;Ascending)
OnChange property of the dropdown box, i've set as :
Filter(collection1.Onderwerp;galIcollection.Selected.Onderwerp=drpSubjectFilter.Selected.Result)
The problem is that the gallery isn't filtered.
Someone any idea ?
Kind regards
Steve
Solved! Go to Solution.
Hi @SteveDesmedt ,
Have you tried what @mdevaney suggested? Did it work?
Regards,
Mona
I think your issue is with the code you placed in the OnChange property of your dropdown. To filter the gallery based on the dropdown selection I would put your code in the Items property of the gallery instead and make a few changes to it...
Your code
Filter(collection1.Onderwerp;galIcollection.Selected.Onderwerp=drpSubjectFilter.Selected.Result)
My suggested code for gallcollection Items property
Filter(collection1;Onderwerp=drpSubjectFilter.SelectedText.Value)
You might have adjust my code if I got the column or control names wrong but I think it should work. Let me know!
Also, I did a mini-tutorial on this topic for another user yesterday. You might want to check it out. Its way simpler than your scenario but maybe you can read it and get an idea of how to implement in your app. https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Create-multiple-data-cards-from-one-...
---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."
Hi @SteveDesmedt ,
Have you tried what @mdevaney suggested? Did it work?
Regards,
Mona