cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Generate Unique ID in SharePoint List using power automate

I have to generate unique ID in the format "predefinedtextnumber' by incrementing numeric value in previous ID by 1 every time a new item is created in SharePoint list.
I cannot use the ID field of the SharePoint List as this numeric value of the unique ID will have to reset 1 on the 1st of every year.

 

I have created a scheduled flow to generate the ID. Would like to know if the ID can be generated when an item is created by locking the previous ID when multiple items are created simultaneously in SharePoint list.

 

Thanks,

SV

4 REPLIES 4
Highlighted
Super User II
Super User II

HI @sunithav 

 

Yes is entirely possible. I would recommend however to save it elsewhere and keep incrementing it as needed. You can even have, in SharePoint, a calculated field that has the "nextValue" so that you don't need to do any math on Flow.

 

I recommend this because of your restriction of having to reset it once a year. Also, this would allow you to reset anytime, make adjustments, and change the way the ID is built if necessary without changing your Flow.

 

Finally, you can use the same list in other areas where similar functionalities are required. 

 

Each time you need an ID, just check that column and increment it and you're good to go.

 

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

Cheers
Manuel

Highlighted

Hi ,

 

Thanks for your response. How do I lock that "nextvalue" from multiple list items accessing it at the same time when more than one item gets created in SharePoint list?

 

Thanks,

SV

Highlighted

Hi @sunithav 

 

Indeed that could be an issue, but do you have so much traffic that it can happen 2 Flows fetching the value at the same time?

 

If this is the case then you need to use automatic numbering in SharePoint to allow for race conditions, but then you'll run into issues when you want to re-set the values every year.

 

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

Cheers
Manuel

Highlighted

Yes Manuel. This is the unique ID used to identify the records. Hence cant afford have duplicate values.

 

Thanks,

SV

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (3,871)