Good morning, everyone!
I have a dropdown that filters my gallery item when selected. For when there's something selected it works, but when it's blank, I'd like for it to return all the values. I think my formula is solid but the records returning are all empty.
I have a collection called DetailList and within my dropdown Items Property I am searching for distinct AcctUnit:
Sort(Distinct(Filter(DetailList, GM = _FindGM), AcctUnit), Ascending)
which gives me the right results:
In my gallery in the Items Property I have this to filter and return the records:
Filter(DetailList, GM = _FindGM, If(!IsBlank(Dropdown1_1.SelectedText.Value), AcctUnit = Dropdown1_1.SelectedText.Value))
If I choose let's say 1413900 I return the all the filtered items:
but when I don't choose anything I get a blank gallery:
Any help would be greatly appreciated!
Solved! Go to Solution.
Try to adjust your Formula as follows:
Filter(DetailList,
GM = _FindGM &&
If(!IsBlank(Dropdown1_1.SelectedText.Value), AcctUnit = Dropdown1_1.SelectedText.Value, true)
)
You want the result of your If statement to return a true if the dropdown is blank so that the other records are matched.
I hope this is helpful for you.
Try to adjust your Formula as follows:
Filter(DetailList,
GM = _FindGM &&
If(!IsBlank(Dropdown1_1.SelectedText.Value), AcctUnit = Dropdown1_1.SelectedText.Value, true)
)
You want the result of your If statement to return a true if the dropdown is blank so that the other records are matched.
I hope this is helpful for you.
Omg thank you so much! Much appreciated! @RandyHayes I keep on learning new things everyday thanks to you!
I used the same logic but it has a delegation problem on SP lists. Any idea on how to solve it?
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
206 | |
187 | |
82 | |
51 | |
37 |
User | Count |
---|---|
288 | |
244 | |
121 | |
75 | |
55 |