I have a gallery and a dropdown.
The gallery shows a list of tickets. The dropdown lets you filter the gallery based on three ticket statuses: Active, Complete, Cancelled.
The filter works just fine. However, a user is complaining that the most recent selected ticket stays on screen even when you filter to a different type of ticket. Meaning if he selected a ticket that was Active and then filtered to Complete tickets, his Active ticket would still be showing.
I watched Shane's video here where he shows how to make a button that resets a gallery and deselects what is currently selected. I have my gallery setup with the same varRecord variable he uses and when I setup a button with his code on the OnSelect property, it works. Here's the code:
Set(varRecord, Blank()); Reset(Gallery)
However, if I use that same code on the OnSelect or OnChange property of the dropdown nothing happens. Is there a way to trigger that same code or action when the dropdown selection changes?
Thank you!
Solved! Go to Solution.
OMG I feel so dumb. So sorry. I had an invisible dropdown on top of the one I needed to change. So I kept selecting that one and changing its properties. Finally realized when I selected the correct dropdown from the left list the original code from Shane’s video worked fine. Gonna mark this as fixed.
Set the gallery Default property to {}
So whenever you change the dropdown, items on the gallery should reset with the selection clear.
Sample: (Below one shows after change the dropdown)
I also need it to default to active when folks first enter the page. Is there a way to do both?
Sorry I misunderstood. Thought you wanted me to put {} in the dropdown default property. Unfortunately my gallery default has a LookUp:
LookUp(‘SharePoint Source’, ID = varIDTicket).
I believe this helps with direct linking to tickets from email notifications. Is there some other way to handle this?
OMG I feel so dumb. So sorry. I had an invisible dropdown on top of the one I needed to change. So I kept selecting that one and changing its properties. Finally realized when I selected the correct dropdown from the left list the original code from Shane’s video worked fine. Gonna mark this as fixed.
As per your ask,
1. The First one, to deselect the gallery item whenever the gallery refreshed
2. The Second one, To set default value for the dropdown
Both should work. And we can set the LookUp(‘SharePoint Source’, ID = varIDTicket) to preselect the gallery.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
191 | |
66 | |
45 | |
42 | |
20 |
User | Count |
---|---|
244 | |
120 | |
83 | |
74 | |
69 |