I'm looking for a way to increment a counter to get a unique ID each time I receive an email. I tried to create a Sharepoint list to increment a value with the following actions :
GetItems -> initialize variable -> increment variable -> update item
I don't get the desired result. Is there a way to achieve this?
Each flow run is independent of each other. Initializing a variable will just initialize it at that same value each run. There are a few ways we could try and get around this but it would depend a lot on how you have your SharePoint set up. If you want a specific unique ID you will need to pull a number in from somewhere and increment it. Otherwise you could always generate a random number, depending on how many runs you have it is very unlikely that you will generate a duplicate number.
Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please post a screen shot of your Flow in edit mode. Also, what happens when it runs? You say that you don't get the desired results...
is there a solution to the initial request? if someone has the solution can you post the screenshot cause I would like to achieve the same thing.
An easy way to accomplish this is as follows:
See my example below. You can refer to the variable when you need to use the counter number.
Check out the News & Announcements to learn more.
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.