I have two lists that are linked via ID. The first list (let's call it "box") can have several items from the second list (let's call them "cubes"). All of the cubes that should be in the box are display in a gallery next to the form.
When I open up the first box after loading the page I get the right cubes that are linked to the box. When I close the box and open up another I get all the cubes from the previous box in my gallery.
I use the following code in OnVisible on the screen:
ClearCollect(BoxCollection; Filter(Cubes; BoxID= SharePointIntegration.Selected.ID));;
And the BoxCollection is used as a data source in the gallery.
Is there any way to make sure that the proper items are loaded? If I select the items twice I get the proper result. It's just like it gets cached somewhere and it gets immediately loaded once you select the item.
Any help would be much appreciated.