cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
tomgardzinski Helper IV
Helper IV

ETAG erros, and more ETAG errors while Patching

Hello,

I am wondering if there is any help out there for ETAG errors while Patching.

I have a screen with a form that asks 10 questions. The user can save each question as they go a long. 

SaveButton1 and SAveButton 2 (and so forth) have their OnSelects with a Patch. I've tried many different things with Patch including using LookUp, and also First(Filter... Here is the code I am currently using or have recently tried:

1. Patch(IPAC_AuditList, GalleryAuditList.Selected, AuditForm.Updates)

2. Patch(IPAC_AuditList, GalleryAuditList.Selected, {'Q1.2Results': DDQ1_2DataCardValue.Selected, 'Q1.2NCIssue': 'Q1-2NCIssueDataCardValue'.Text, 'Q1.2AuditorNotes': 'Q1.2AuditorNotesDataCardValue'.Text})

 

I've also tried using Refresh before the Patch coding.

 

Can anyone help me with this issue? I am on the cusp of getting some institutional buy in with Power Apps, but getting these errors for what seems like a simple save and update to a datasource seriously ruins any appetite with Power Apps and other MS automation tools.

Please help @v-siky-msft @Pstork1 @mdevaney @yashag2255 @RezaDorrani 

1 ACCEPTED SOLUTION

Accepted Solutions
tomgardzinski Helper IV
Helper IV

Re: ETAG erros, and more ETAG errors while Patching

To anyone interested I fixed this issue on my own. Instead of having separate buttons with OnSelect Patching the records to the main data source, I first collected each response to each question in a separate Collection (table). Then when the user has all questions complete, or is ready to "Save" I then run Patch on the OnSelect of a "Save" Button. My only issue now is that I have approximately 50 questions, which means 50 Collections, and then trying to Patch 50 collections to the datasource seems to be not working as the app is getting quite clunky and performance is an issue.

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: ETAG erros, and more ETAG errors while Patching

If I am following you then you are doing multiple patches against the same record without doing a refresh between patches.  Is that correct?  If it is then I suspect your issue is that when you do your second patch against the record its trying to patch the original cached record, but you've already changed it so it throws an error.  You really shouldn't try to patch the same record over and over again without refreshing the data source.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
tomgardzinski Helper IV
Helper IV

Re: ETAG erros, and more ETAG errors while Patching

I should have include the entire code, and not just the Patch code.

 

In fact I am using a Refresh before the Patch coding.

 

1. Refresh(IPAC_AuditList);
Patch(IPAC_AuditList, GalleryAuditList.Selected, AuditForm.Updates)

2. Refresh(IPAC_AuditList);

Patch(IPAC_AuditList, GalleryAuditList.Selected, {'Q1.2Results': DDQ1_2DataCardValue.Selected, 'Q1.2NCIssue': 'Q1-2NCIssueDataCardValue'.Text, 'Q1.2AuditorNotes': 'Q1.2AuditorNotesDataCardValue'.Text})

Community Support
Community Support

Re: ETAG erros, and more ETAG errors while Patching

Hi @tomgardzinski ,

Based on the ETAG error that you mentioned, I think this error would occur when multiple users edit your same data source (SP List) records at the same time.

 

Have you taken a try to update records within your data source uing UpdateIf function? Please consider modify your data source records using UpdateIf function instead of Patch function, then check if the issue is solved.

 

On your side, please consider modify your formula as below:

Refresh(IPAC_AuditList);
UpdateIf(
         IPAC_AuditList,
         ID = GalleryAuditList.Selected.ID, // or type PrimaryColumn  = GalleryAuditList.Selected.PrimaryColumn
         {
            'Q1.2Results': DDQ1_2DataCardValue.Selected, 
            'Q1.2NCIssue': 'Q1-2NCIssueDataCardValue'.Text, 
            'Q1.2AuditorNotes': 'Q1.2AuditorNotesDataCardValue'.Text
         }
);
Refresh(IPAC_AuditList)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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.
tomgardzinski Helper IV
Helper IV

Re: ETAG erros, and more ETAG errors while Patching

Hello @v-xida-msft ,

Here is the update I made to my OnSelect for my save button:

Refresh(IPAC_AuditList);
UpdateIf(IPAC_AuditList, Audit_ID = GalleryAuditList.Selected.Audit_ID, {'Q1.1Result': DDQ1_1DataCardValue.Selected, Q1_x002e_1NCIssue: 'Q1.1NCIssueDataCardValue'.Text, Q1_x002e_1AuditorNotes:'Q1.1AuditorNotesDataCardValue'.Text});
Refresh(IPAC_AuditList)

Where Audit_ID is my ID column. Here is the corresponding error I received:

UpdateIf error.PNG

 

I have only been running this app and testing in browser mode so far. I have tried playing it from the web link and I still get the same error. Could this be a sharepoint issue? Rather than a power apps issue?

Looking at the history of issues in the community forum, there seems to be a lot that concern Submit, LastSubmit, UpdateIf, and Patch. It appears that PowerApps and Sharepoint only like one submission per a session. Two or more and there are failures.

Can this be escalated?

tomgardzinski Helper IV
Helper IV

Re: ETAG erros, and more ETAG errors while Patching

To anyone interested I fixed this issue on my own. Instead of having separate buttons with OnSelect Patching the records to the main data source, I first collected each response to each question in a separate Collection (table). Then when the user has all questions complete, or is ready to "Save" I then run Patch on the OnSelect of a "Save" Button. My only issue now is that I have approximately 50 questions, which means 50 Collections, and then trying to Patch 50 collections to the datasource seems to be not working as the app is getting quite clunky and performance is an issue.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

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