cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
djibix
Level: Powered On

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
djibix
Level: Powered On

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

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... 

djibix
Level: Powered On

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.

djibix
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 312 members 5,947 guests
Please welcome our newest community members: