web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Server Response ETAG m...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello!

 

I'm developing an app that keeps track of an inventory, where one person subtracts from the inventory and the other person adds to it.

 

I've managed to get this to work but whenever the user adds, and soon after the other user subtracts, I get an ETAG mismatch.

 

I Have seen solutions of this and most said about the Refresh(SharePointList) function, I tried it and it didn't work aswell.

 

Can anyone help me?

 

Subtract code

If(
 Slider2.Value > 0 && Value(ThisItem.'Qtd.') > 0;
 Patch(
 Ferramentas;
 ThisItem;
 {'Qtd.': Value(ThisItem.'Qtd.') - Slider2.Value}
 )
);;
If(
 Slider2.Value > 0 && Value(ThisItem.'Qtd.') > 0;
 Navigate(
 TelaÊxito;
 ScreenTransition.Cover
 )
);;
If(
 Slider2.Value > 0 && Value(ThisItem.'Qtd.') <= 0;
 Navigate(
 TelaErro;
 ScreenTransition.Cover
 )
);;
Refresh(Ferramentas);;
Reset(Gallery2)

 

Add code

If(
 Slider2_1.Value > 0;
 Patch(
 Ferramentas;
 ThisItem;
 {'Qtd.': Value(ThisItem.'Qtd.') + Slider2_1.Value}
 )
);;
If(
 Slider2_1.Value > 0;
 Navigate(
 TelaÊxito;
 ScreenTransition.Cover
 )
);;
Refresh(Ferramentas);;
Reset(Slider2)

I Also added the neat detail of getting a sucess or an error screen in case the item they want to subtract has their stock on 0!

 

If anyone can help I would be immensely thankful since I need to present this app next week!

Thank you!

Categories:
I have the same question (0)
  • PhilD Profile Picture
    1,011 on at
    Hi. I have improved the reliability of something similar by replacing the variable with a LookUp in the Patch function property that defines specific record to patch. https://powerusers.microsoft.com/t5/General-Discussion/Solution-for-my-ETAG-Mismatch-errors-when-patching-multiple/m-p/189332 In your case, you may want to try replacing 'ThisItem' with a LookUp to the record you want to patch.
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Based on the error message that you provided, I think there is something conflict issue with your Subtract code and your Add code.

    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-with-changes-on/td-p/131599

     

    Please take a try to modify your formula as below:

    Subtract code:

    Refresh(Ferramentas);; /* <-- Move Refresh('datasource') formula into here */
    If(
     Slider2.Value > 0 && Value(ThisItem.'Qtd.') > 0;
     Patch(
     Ferramentas;
     ThisItem;
     {'Qtd.': Value(ThisItem.'Qtd.') - Slider2.Value}
     )
    );;
    If(
     Slider2.Value > 0 && Value(ThisItem.'Qtd.') > 0;
     Navigate(
     TelaÊxito;
     ScreenTransition.Cover
     )
    );;
    If(
     Slider2.Value > 0 && Value(ThisItem.'Qtd.') <= 0;
     Navigate(
     TelaErro;
     ScreenTransition.Cover
     )
    );;
    Reset(Gallery2)

    Add Code:

    Refresh(Ferramentas);; /* <-- Move Refresh('datasource') formula into here */
    If(
     Slider2_1.Value > 0;
     UpdateIf( /* <-- Modify formula here, use UpdateIf function to update your record instead of Patch function */
     Ferramentas;
     ThisItem;
     {'Qtd.': Value(ThisItem.'Qtd.') + Slider2_1.Value}
     )
    );;
    If(
     Slider2_1.Value > 0;
     Navigate(
     TelaÊxito;
     ScreenTransition.Cover
     )
    );;
    Reset(Slider2)

    Please take a try with above solution within your app, then check if the issue is solved.

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello, thank you for the answer, although I'm trying to do it, I get an error message like the following:

     

    "Invalid argument type (record). Expecting a boolean instead"

     

    Any suggestions on how to fix that?

    Thanks!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    UPDATE

     

    So I've managed to fix the argument issue but now everytime I try to add something to the list with de Add Code, instead of adding the slider value to the 'Qtd.' column of "ThisItem", it sets the 'Qtd.' value of every item to be the same as "ThisItem"

     

    Code is as follows:

    Refresh(Ferramentas);;
    If(
     Slider2_1.Value > 0;
     UpdateIf(
     Ferramentas;
     ThisItem.'Qtd.' >= 0; /* The fix to the argument error was adding ">=0" /*
     {'Qtd.': Value(ThisItem.'Qtd.') + Slider2_1.Value}
     )
    );;
    If(
     Slider2_1.Value > 0;
     Navigate(
     TelaÊxito;
     ScreenTransition.Cover
     )
    );;
    Reset(Slider2_1)

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    ***LATEST UPDATE***

     

    Ok, so I tried a couple of things.

     

    First things firts, when I entered the code for the add button you provided it hit me with an Invalid Argument error, expecting a boolean. What I did to fix it was the following:

     

    Refresh(Ferramentas);;
    If(
     Slider2_1.Value > 0;
     UpdateIf(
     Ferramentas;
     ThisItem.'Qtd.' >= 0; /* The fix to the argument error was adding ">=0" /*
     {'Qtd.': Value(ThisItem.'Qtd.') + Slider2_1.Value}
     )
    );;
    If(
     Slider2_1.Value > 0;
     Navigate(
     TelaÊxito;
     ScreenTransition.Cover
     )
    );;
    Reset(Slider2_1)

     

    So after doing this it worked, no ETAG Mismatch, but (and it is a huge but), now, whenever I try to add or subtract anything on my sharepoint list, the following happens:

     

    Lets create a hypothetical situation to better illustrate

     

    1- I manually set all sharepoint 'Qtd.' values to 10;

    2- I click the Subtract button of ThisItem with the Slider2.Value set to 5. It works fine, ThisItem 'Qtd.' value is now 5;

    3- I click the Add button of the same ThisItem with the Slider2_1.Value set to 10. Now ALL SharePoint items have their 'Qtd.' set to 20 (Initial 10 + Slider2.Value)

    4-Now if I click the Subtract button again, it works fine;

    5- Now clicking the Add button again on any item, sets ALL SharePoint values to 20+Slider2_1.Value, regardless of the value the item had;

     

    So in sum

     

    -I add a value to an item, all SP items get set to the same number (Number X);

    -I subtract a value to an item, only that item subtracts to Number X;

    -I add a value again to any item, it takes Number X and adds the slider value to all SP items;

    -Now all items have Number Y value;

    -I subtract again from any item, only given item subtracts from Number X instead of Number Y;

    -I add again, all SP items are now Number Y + Value, so lets call it Number Z;

    -Subtract again, selected item now subtracts to Number instead of Number Z;

     

    ...and so on...

     

    Anyone ever had this error? It's really making me crack my head, I would appreciate any help!

     

    Thanks!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Did you ever get a solution to your problem?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard