cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PhilD
Level 8

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

Re: Solution for my ETAG-Mismatch errors when patching multiple times

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

 

@TopShelf-MSFT

1 REPLY 1
Administrator
Administrator

Re: Solution for my ETAG-Mismatch errors when patching multiple times

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

 

@TopShelf-MSFT

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 278 members 4,725 guests
Please welcome our newest community members: