cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KarolBarczynsk
Regular Visitor

Browse Gallery Selected Item as Dynamic Variable Update (Sharepoint list)

Hi,

 

I try to use Variable instead of BrowseGallery.Selected but there is some problem with update the value after submit.

 

The Scenario:

The App is connected to Sharepoint list. To make it simple the App have 3 screens:

- on the first is Gallery from which you can choose Item

- second have View form of main data of selected item (also have some formulas which check if some of the fields are empty or not)

- third have full editable view of selected item

 

When I open the third screen and save the changes I made the application moving me to second page and here is the Issue.

When I'm using BrowseGallery.Selected everything working fine and fast but when I change to use Variable (which is safer for me especially when it coms to use some button to refresh sharepoint gallery, you know preventive action) then the Formula didn't see that I made some change on this item. It still remember the old/starting values.

 

I find out that when I add Set(varX, BrowseGallery.Selected) after submitting the form it almost working correct but not always. When I act fast select something and click Submit then it looks like the application suffers from a lack of time for all calculations. They are not visible in the Formulas but they are still in the cash memory (i know this because when I reenter to the third screen I see old data but when I submit form with out any change the second screen showing me the data I enter the first time, and then the loop is starting).

1 REPLY 1
Pstork1
Dual Super User
Dual Super User

Before submitting the item save the ID from the variable.  Then submit the item. Then refresh the variable holding the item by doing a Lookup() based on the id.  Something like this.

set(vartempID, varX.ID);Submitform(formname);Set(varX, Lookup(datasource, ID = vartempID));


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,516)