cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kudo Kingpin
Kudo Kingpin

Solution for my ETAG-Mismatch errors when patching multiple times

This might be obvious (although it wasn't to me) but since I was able to establish such a definitive link between my ETAG errors and the cause, I thought I would post here in case it is helpful to someone else. 

 

The problem was with the way I was referencing the variable in the patch function (see examples below).

 

Using Number 1 the patch works the first time, but if the user patches the record again a few minutes later, it produces an ETAG error on the screen and the patch is unreliable (works about 90% the time).

 

Using Number 2 the ETAG errors immediately were gone and the patch is much more reliable (haven't had one instance yet of failure).

 

Number 1

Only works the first time

 

Refresh(Employees);
Set(varEmployee, varCurrentUserEmployeeTableRow); //employee table entry corresponding with logged in O365 user

//update item
Patch(
Employees,
varEmployee,
{TaskAvailabilityStatus:"Active"},
{LastStatusTime:Now()}
)

 

Number 2

 

Works every time

 

Refresh(Employees);
Set(varEmployee, varCurrentUserEmployeeTableRow); //employee table entry corresponding with logged in O365 user

//update item
Patch(
Employees,
LookUp(Employees, ID = varEmployee.ID),
{TaskAvailabilityStatus:"Active"},
{LastStatusTime:Now()}
)

 

Hope this helps somebody!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Thanks for taking the time post this @PhilD! It will definitely help future users who run into the same scenario

 

@Anonymous

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thanks for taking the time post this @PhilD! It will definitely help future users who run into the same scenario

 

@Anonymous

View solution in original post

Helper IV
Helper IV

@PhilD @Anonymous 

I thought this was going to be the magic bullet to fix my ETAG ing issue while patching but no dice.

Back to the drawing board. I've seen other posts that you have referred to and they just don't work. posts from @Anonymous and others.

Here is the coding that seems to work the most, although failure rates occur after multiple attempts. Any other thoughts. I'm using PowerApps release 3.19111.33.

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

Advocate I
Advocate I

Thanks For Posting, Saved me a lot of time !! 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (46,684)