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

View solution in original post

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

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 290 members 5,282 guests
Please welcome our newest community members: