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

ETAG mismatch after item permissions are updated by a flow

I have a flow that updates item permissions when an item is created or updated.

It does so using the Sharepoint API.

This works well.

When I edit an existing quickly after creation (before the flow has had time to run) it still works well, I can modify it and it is recorded in the list.

When I edit an existing item after the flow has run, I get the "ETAG mismatch" error (see attachment).

I tried to use Refresh(sourceOfMyItems) but it does not correct the problem.

First "workaround" I found is to close the app and open it again. Then I guess it fully refreshes the source and I can edit all existing items again, until the flow runs again. But this is not really practical.

Second workaround is to force the selected item refresh by using LookUp before opening the Form (OnSelect):

UpdateContext({activité: LookUp(Activité; ID = BrowseGallery1.Selected.ID)});;

It kind of works but not consistently. The ETAG error still appears a lot.

Would there be a better way to have the source refreshed?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: ETAG mismatch after item permissions are updated by a flow

I found a solution/workaround to my problem.

The flow updating the item's permissions was triggered on Sharepoint event "item created or updated".

I changed that to trigger it directly from the app after the SubmitForm function and only if the form was in FormMode.New.

I took that from this video: https://www.youtube.com/watch?v=T6cC65YwjSI&feature=youtu.be,

except that I used SubmitForm and the Form.LastSubmit.ID property to get the item ID.

I really do not like to handle permissions on the client side but I can do with it for this app, and it works...

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: ETAG mismatch after item permissions are updated by a flow

Hi @djibix 

In theory, the way that you're refreshing your data source should correct the "ETAG mismatch" error.

It's possible that the data cache setting is preventing the refresh of your data.

If the 'use longer data cache' setting is enabled, I'd try disabling it to see if that helps.

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/SQL-OnPrem-Refresh-Data-Bug/m-p/398... 

Highlighted
Frequent Visitor

Re: ETAG mismatch after item permissions are updated by a flow

Hi @timl,

I just tried with the "Use longer data cache timeout and background refresh" parameter disabled but it does not improve the situation unfortunately.

Thanks anyhow.

Highlighted
Frequent Visitor

Re: ETAG mismatch after item permissions are updated by a flow

I found a solution/workaround to my problem.

The flow updating the item's permissions was triggered on Sharepoint event "item created or updated".

I changed that to trigger it directly from the app after the SubmitForm function and only if the form was in FormMode.New.

I took that from this video: https://www.youtube.com/watch?v=T6cC65YwjSI&feature=youtu.be,

except that I used SubmitForm and the Form.LastSubmit.ID property to get the item ID.

I really do not like to handle permissions on the client side but I can do with it for this app, and it works...

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,399)