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 III
Dual Super User III

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,499)