cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
davidstone
Level 8

Dynamic changes to gallery Items property - not working consistently

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Dynamic changes to gallery Items property - not working consistently

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:9.JPG

 

10.JPG

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Dynamic changes to gallery Items property - not working consistently

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:9.JPG

 

10.JPG

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 344 members 6,483 guests
Please welcome our newest community members: