cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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... 

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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,219)