I think I see
So the Hack requires 2 steps
1 - Set the current Selected item in a list ( Gallery) to a context variable when you invoke a Navigate command.. this flushes the binary so it does not think the record is stale
2 - Issue a Refresh before you submit the form
Do I understand correctly?
If so, then we will need to do this anytime we reference a SharePoint list item in a form
Flush by setting a context variable when you use a Navigate, then when you want to save, Reset data source, Submit Form...
Do I understand correctly?
If so, then how so we handle if we are using Powerpps as the default form with a SharePoint List? There is no "Navigate" to flush the ETAG flag from a modern SharePoint list so how would we set the ETAG flag to "fresh" using the SharePointIntegration options... where and what would we trigger this on to flush the ETAG flag used by PowerApps? There is no List.Selected when using a PowerApp as a default form that I know of so what is the fix for this?
Your explanation is very helpful
Users that are in SharePoint need to be able to go into a list item and modify it more than 1 time in a session. This is a common scenario. Right now, the user has to refresh the browser to get the ETAG flag to refresh so they can edit and save an item without getting this error if they edit a list item more than 1 time during a session if they are using PowerApps as the default form behind a modern list.
There is no way that I see that we (solution authors) can handle this in code if we are using PowerApps as a default form for a SharePoint list since we dont have a way to flush the ETAG flag.
I understand the need to preserve data integrity, but customers need a way to handle the common scenario of a user wanting to modify the contents of a SharePoint list item more than 1 time in a session.
This is a showstopper...We need a way to flush the ETAG flag if a form is opened more than 1 time from a SharePoint list during a session to get this error to stop firing...
Understood.... Stuff happens... All of this is very magical to me
Love the Opt Out idea... or maybe letting us flush the flag in code
To the team... Make sure what ever is the fix it is available for SharePoint Default Forms via the SharePointIntegration control or whatever you want to call it :
Also, that little trick to set Context Variables for a screen in the Navigate command is very handy .... It will solve a problem I have been thinking about with hiding some controls on the initial load of a screen... I can stick the context variables in that Navigate command to set things up the first time through.. love it
Update: My super user sent note this morning "The app works, no more errors!" Our business team met a few hours ago, the owner is well pleased and scaling her customer base up. Thanks again Microsoft. I now have (a totally unrelated) Ms Flow timeout to resolve. Another day, another problem!
Great to hear
Msft - Let us know if we need to update all of our code bases to handle this per the tip in this thread or if you plan on a hot fix so we can opt out of ETAG checking for the whole app while this is resolved longer term
Thx again fir the excellent post yesterday
FIX FOR SHAREPOINT LIST WITH A BOUND POWERAPPS FORM
See this post
I can confirm this works
Add a Refresh(SharePointList) in the OnEdit in the SharePoint Integration Control where "SharePointList" is the name of the SharePoint list bound to the PowerApp Form
I was able to edit the same item multiple times in the same session after adding this code with no error
If I took out the Refresh (SharePointList) in the OnEdit in the SharePoint Integration Control and tried to edit more than 1 time in a session then I got the error again
THIS IS THE FIX FOR THE ETAG INVALID ERROR ISSUE - Add Refresh in the OnEdit in the SharePoint Integration Control
Bit by bit we are getting this solved!
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200