cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sunithav
Helper IV
Helper IV

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
manuelstgomes
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

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

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

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

 

Thanks,

SV

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (51,098)