Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Gallery selected item is always the previously selected item

Hi all,


I am having trouble with Gallery.Selected item passing on to the next screen, to then appear in a Gallery filtered by that selected item.

I have a list of stocks, and on selecting one, I want my next screen gallery to show all inspections of that stock. This works on all levels except...


What happens (on Iphone only), is that on selecting an item in the first 'Stocks' Gallery, the next screen 'Inspections' Gallery shows the previously selected item instead.  So the user needs to go back and reselect the correct item again, every time. This is obviously causing issues/false data.


My code is to Naviagte from a SeedStocks Screen Gallery to an Inspections Screen with a Gallery with Items property set to Filter(colInspections, Stock= SelectedStockID)


But have also tried this is an attempt to clear what was selected previously, to no avail.

Navigate(SeedStocks,ScreenTransition.None, {SelectedStockID:""});

This is baffling because this is working on another navigation to a Stock Overview screen, using exactly the same syntax!


What is the most stable way to utilise the Gallery.Selected.Item?

Can this be resolved?


Many thanks for any suggestions


Level: Powered On

Re: Gallery selected item is always the previously selected item

I guess the id is already available in the Inspections screen. you dont have to pass through navigate function.. Also you can set the id as a varialbe value( just for the debuggin pourpoose).Just to make sure the the id is changing everytime you select the different item.

Community Support Team
Community Support Team

Re: Gallery selected item is always the previously selected item

Hi @maxtarneberg,


Please try below steps:

1. Set the OnSelect property of the navigation button to:


2. Set the Items property of the gallery in Inspections Screen to:

Filter(colInspections, BrowseGallery1.Selected.StockUniqueID in Stock)

I just tested with this and it works for me. Notice that the StockUniqueID and Stock columns' column types in the 2 lists should be Text/Number. If not, please tell what are their column types.




Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: Gallery selected item is always the previously selected item


Hi Mona,


Many Thanks for your suggestion


I'm afraid your syntax didn't work for me. The Gallery simply didn't filter, so all Inspections for all stocks were shown.


To complicate things, StockUniqueID is a Number, and Stock is a Text. While this is not ideal I confess, several other areas of the app now rely on this in order to function correctly.

In my sharepoint list I tried chaging Stock to a Number to test, and then back to Text when I saw a mass of errors across my app. 

I'm now seeing endless loading dots, and my users are unable to open the app at all because of loading times.


Is my app having to re-cache the entire column/will it ever end? I have 277 items