cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NigelP
Super User
Super User

Server Response ETAG mismatch (Conflicts exist with changes on the server, please reload)

Hi

 

I am getting the dreaded ETAG error message when I submit my form and perform a patch on the record.  Here is the OnSelect code :-

 

SubmitForm(EditSubmissionsForm1);If(numattachments > 0,ClearCollect(Attachments,SubmissionsForaMeetingGallery.Selected.'{Attachments}'.DisplayName);

ClearCollect(AttachmentsUri,SubmissionsForaMeetingGallery.Selected.'{Attachments}'.AbsoluteUri);

UploadafiletoSharePointfromPowerApps.Run(First(Attachments).DisplayName,First(AttachmentsUri).AbsoluteUri,"/Shared Documents/"  &  PRJIDComboBox.Selected.PRJ_x002d_ID & "/" & SubmittedGateNumber.Selected.Value));

Patch(Submissions,

{ID:EditSubmissionsForm1.LastSubmit.ID},

{Assurance_x002d_Status:{

    Value: "With Assurance",

    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}

}

)

 

This only occurs occasionally and if I remove the PAtch statement - not at all.

 

Any Ideas ?

 

Regards

 

Nigel

28 REPLIES 28
v-xida-msft
Community Support
Community Support

Hi @NigelP,

 

Could you please share more details about your app's configuration?

 

The user @karl has faced same issue with you, please check the response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/Server-Response-ETAG-mismatch-Conflicts-exist...

 

I think you have faced an ETag HTTP response issue within your app. Please check the following article for more details about ETag HTTP response:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag

 

The ETag is a part of HTTP, it could be used for optimistic concurrency control as a way to help prevent ghost writes. Please check the following article for more details:

https://softinstigate.atlassian.net/wiki/spaces/RH/pages/9207940/ETag

 

Based on the formula that you provided, I think there is a conflict issue with the SubmitForm function and Patch function within your formula. 

 

The SubmitForm function would save data into your data source, the Patch function would add/update record in your data source, the two functions may works at the same time, so the ETag Conflicts issue occurs.

 

As an alternative solution, you could consider take a try to remove the Patch function from the OnSelect property of your submit button, and then add it within the OnSuccess property of the Edit form control. I have made a test on my side, please take a try with the following workaround:

 

  • Set the OnSelect property of the Submit button to following formula:
SubmitForm(EditSubmissionsForm1);
If(numattachments>0,
 ClearCollect(Attachments,SubmissionsForaMeetingGallery.Selected.'{Attachments}'.DisplayName),
 ClearCollect(AttachmentsUri,SubmissionsForaMeetingGallery.Selected.'{Attachments}'.AbsoluteUri);
 UploadafiletoSharePointfromPowerApps.Run(First(Attachments).DisplayName,First(AttachmentsUri).AbsoluteUri,"/Shared Documents/"  &  PRJIDComboBox.Selected.PRJ_x002d_ID & "/" & SubmittedGateNumber.Selected.Value)
)
  • Set the OnSuccess property of the Edit form control to following formula:
Patch(Submissions,
{ID:EditSubmissionsForm1.LastSubmit.ID},
{Assurance_x002d_Status:{
    Value: "With Assurance",
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}
}
)

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Kris

 

Did as you suggested.

 

Moved the PAtch function to the OnSuccess Property of the EditForm.

 

However, I still got the ETAG error.

 

I suppose I am going to have to add a timer to delay things for a couple of seconds unless you have any further suggestions.

 

Thanks for your help.

 

Nigel

Hi Kris

 

Does PowerApps go to the OnSuccess property before the transaction to insert the item into the SharePoint List has completed ?

 

Is there a way of making the transaction synchronous, so the Patch does not start until the ListItem Insertion has completed ?

 

The List is around 1500 items long at the moment and will grow.

 

What other configuration information do you want ?

 

Regards

 

Nigel

I am also seeing this same issue with a submitform .. Intermittant issue... mostly does not work anymore but will sometime work in dev studio

 

Data Source is a Task list in SharePoint...

 

Have tried replacing the connector with no luck

 

Just started heppening in the last week or so..

 

Session ID: 88a3da59-3cb7-487c-84ed-b0070a160b4a
PowerApps 3.18071.25

 

error message states

"Conflicts exist with Changes on the server, Please Reload. Server Response ETAG Mismatch

ClientRequestID:e51e2463-7e8c-4fal-a5f3-85dddf254abd 

serverRequestID: bee1789-406f-6000-cd52-048d2d4af5bf"

I am seeing a pattern now

 

I republished the app and an item will save fine on the first edit and save but you will get this the second time you edit and try to save.

 

This is very consistant an easy to reproduce. 

 

Open item and edit and save - no problem.  Open another list item and save - no problem.  Go back to first item and try and save - you get the error.  Go to the second item that you edited and try and edit and you get he same error

 

 

So here is the pattern

Open an item and save - works fine.   Open the saved item and edit and try and save - you get the error.

v-xida-msft
Community Support
Community Support

Hi @NigelP,

 

Just an update on this issue - PowerApps Product Team is aware of this issue and investigating it:2.JPG

 

 

If there are any updates or workarounds for this issue, I would reply here.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Kris

 

Thanks for this.

 

IS there a workaround for this ?

 

Thanks

 

Nigel

I have tested and this error only occurs when you edit an item more than once during a session.  If you need to edit more than one time in a session then just log out and log in again and it should accept the changes....

Hi @skylitedave

 

Unfortunately, this will not work for me.as I create a list item and then update one of the fields in the list item using Patch.

 

So I cannot log out and then login again.

 

Regards

 

Nigel

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,424)