I have a gallery which is set to filter items from a SharePoint list based on a column which will contain a text value of either "a" or "b". The filter points to a global variable, with expectation that by changing the global variable from a to b, my gallery should then switch to showing all the entries where the filtered column = b.
And that happens... most of the time.
The setup is across 2 pages. One the first are two buttons, one setting the variable to a then turning to the gallery page, and the other setting b.
If I press the a button, the page turns and the filter is correctly appliedthe first time only.
If I go back and select the b button, it still shows a in the gallery. If I then go back and press the same b button again, so basically pressing the same button a second time, the filter is now correctly applied.
Same the other way around too, so basically I think the behavior I'm seeing is that with my gallery set to filter on the value of a global variable, I have to set that global variable twice (to the same value) before the gallery will update the filter.
I tried in classic and improved rendering just in case - both the same.
For now I've worked around it by having two copies of the gallery, each permanently set to either a or b, and instead of changing the filter I just hide or show one or the other. So my new app can go live! But would be good to understand what's happening.
Solved! Go to Solution.
Hi @davidstone,
Could you please share more details about your Filter formula typed within the Items property of the Gallery control?
I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:
Set the OnSelect property of the "Set A" button to following:
Set(CurrentVariable,"a");Navigate(Screen2,ScreenTransition.Cover)
Set the OnSelect proeprty of the "Set B" button to following:
Set(CurrentVariable,"b");Navigate(Screen2,ScreenTransition.Cover)
Set the Items property of the Gallery control to following:
Filter('20181108_case9', CurrentVariable in TaskName) /* <-- TaskName is a column in my SP list */
Please take a try to re-create your app, then check if the issue is solved.
Best regards,
Kris
Hi @davidstone,
Could you please share more details about your Filter formula typed within the Items property of the Gallery control?
I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:
Set the OnSelect property of the "Set A" button to following:
Set(CurrentVariable,"a");Navigate(Screen2,ScreenTransition.Cover)
Set the OnSelect proeprty of the "Set B" button to following:
Set(CurrentVariable,"b");Navigate(Screen2,ScreenTransition.Cover)
Set the Items property of the Gallery control to following:
Filter('20181108_case9', CurrentVariable in TaskName) /* <-- TaskName is a column in my SP list */
Please take a try to re-create your app, then check if the issue is solved.
Best regards,
Kris
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
217 | |
212 | |
84 | |
57 | |
36 |