Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

Incrementing a Variable when multiple users are accessing the MS Flow

I have the following condition inside my MS Flow:-




where mainly i have 2 variables:-

1) TotalNumberOfUsers

2) NumberOfUsersWhoApproved


and as shown above i am incrementing the 2 variables by 1. but my question is let say multiple users access the condition at the exact same time, then how will MS Flow handle this? let say the variable current value =3 , and 2 users access the MS Flow at the exact same time, then can the Increment only increment the variable by 1 instead of 2 for the 2 users? or MS Flow is able to handle this situation? if not , then how i can handle this?

Super User
Super User

Hi @johnjohn123 


If this happens in concurrency, you'll have issues because:

  1. Power Automate 1 fetches the value. It's 1.
  2. Power Automate 1 starts parsing the information.
  3. Power Automate 2 fetches the value. It's 1.
  4. Power Automate 1 updates the value. 2
  5. Power Automate 2 updates the value. 2


Concurency in Power Automate is hard because it's connecting with the database and fetching the information at the same time.


The only way I see this is to have each Power Automate add a row in a list and then have another that groups the rows and updates the value. This way, you'll not deal with increments in the Power Automate, just writting to a list, and then the other Power Automate runs once to update the totals.


Makes sense? Is this possible?


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


@manuelstgomes weird to me that power automate will not handle concurrency by default... SharePoint is document management system which should take into consideration large number of user accessing and updating the same data at the same time!!

Hi @johnjohn123 


SharePoint does enable multiple people collaboration but don't forget that Power Automate is request-based, so it sends a request to the source via API ou other integration and gets the results.


So the Power Automates need to be designed to be atomic and independent of the run of each other, otherwise you'll get into these issues.


It's the way it's designed. To trigger, fetch, parse and end.


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


Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,332)