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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need help with Flow fo...
Power Automate
Answered

Need help with Flow for incremental auto number and multiple instances of the Flow at the same time

(0) ShareShare
ReportReport
Posted on by 242

Hello I had a workflow in SharePoint Designer that worked nicely creating an incremental auto number (year plus number) for an approval workflow that I changed to Flow at the beginning of this year. I've recently discovered there have been issues with it recreating the same number or going back to a previous number. I now have requests with the same number!

 

I have two lists: one with an approval workflow that needs the auto number at the end of the flow to send an email; the other where the auto number is created.

 

I'm pretty sure it's when someone approves a bunch of the workflows for the first list and do it in quick succession and so stuffing up creating the auto number in the second list.

 

I thought about putting a one minute delay in some of the steps, but that's not going to work if the approver approves a few workflows in quick succession anyway. I was hoping someone might have some advice. Here's what the flow looks like. The last image is the list the auto number is created in.

 

Any help is greatly appreciated, than you 🙂

 

 

2020-09-21 08_54_59-Window.png

 

 

2020-09-21 08_55_58-Window.png

2020-09-21 09_06_43-Edit your flow _ Power Automate.png

 

 

2020-09-21 08_58_10-Window.png

Categories:
I have the same question (0)
  • Verified answer
    thjeffri Profile Picture
    Microsoft Employee on at

    Hi xxxxmints,

     

    I think you have probably identified the issue exactly correctly, which is that this is most likely to happen when someone triggers your flow many times in a short span.

     

    Here is one method you could use to prevent the issue:

    1. Combine the two flows you described into one flow AND
    2. Set the Concurrency Control on your flow's trigger to 1

     

    To set the Concurrency Control, select your flow trigger, click the ellipsis (...) icon in the top right, then select Settings.  On the Settings window, set Concurrency Control to On.  You can then set the Degree of Parallelism to 1.

     

    The point of doing this is to make sure that your flow has completed and your counter has been incremented before the flow is triggered again.  The downside of doing this is that you limit yourself to the flow running one-at-a-time, which could have the net effect of a performance decrease when many flows are triggered at once.

     

    There may be other ways to do this.  This is just one possible idea.  I hope this helps!

     

    Tom

  • spinneroo Profile Picture
    242 on at

    Hello @thjeffri 

    Thanks for your help on this.

     

    The Flow is already one (not 2 as you have suggested). The first half is the starting and waiting for approvals. I really need that to keep happening. The second part is the incremental auto number (which is where the issue is).

     

    Will setting the Degree of Parallelism to 1 stop a Flow from being initiated while one is running?

     

    What if I set the Degree of Parallelism on the Apply to Each which is after the approvals have been approved and the auto increment starts?

     

    Thanks again.

     

  • thjeffri Profile Picture
    Microsoft Employee on at

    Hi xxxxmints,

     

    Yes.  I should've explained it better, but setting the Degree of Parallelism to 1 will make sure the flow runs only one instance at a time, queueing up further requests to trigger the flow.

     

    You could set the Concurrency Control on your loop, but that would not prevent multiple instances of the flow from running simultaneously.

     

    Tom

  • spinneroo Profile Picture
    242 on at

    Hi Tom

    Sorry but this is not clearer for me.

    Can I set the Degree of Parallelism to 1 in the Apply to Each half way through the Flow, which would mean the approvals go through and bank up while the auto number is incremented one at a time?

     

     

     

  • spinneroo Profile Picture
    242 on at

    Hi @thjeffri 

    Are you able to explain the above to me? Is it ok to set it on the Apply to Each half way through the Flow and not on the trigger?

  • thjeffri Profile Picture
    Microsoft Employee on at

    Hi xxxxmints,

     

    Yes, it's OK to do either, or both.  They just do different things.

     

    Setting the Degree of Parallelism on the flow to 1 means that the flow will only trigger one at a time.

    Setting the DoP on the Apply to Each loop to 1 means the loop will process one item at a time.

     

    Tom

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard