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 / Auto number in Sharepo...
Power Automate
Unanswered

Auto number in Sharepoint list based on column

(0) ShareShare
ReportReport
Posted on by 153

Hi guys, 

 

I have 1 list with this format.

 

 

Client Company Number

JillNikeN-001
EveAdidasA-001
JohnNikeN-002
WillNikeN-003
SarahAdidasA-002
JenNikeN-004

 

I want auto-number the "Number" column based on "Company" column. If I add a new client for Adidas company, the "Number" field must be "A-003".

 

How can I do that?

Categories:
I have the same question (0)
  • PieterVeenstra Profile Picture
    13 on at

    Simon Denton wrote and article about this a few weeks ago:

     

    https://buildbod.com/2018/05/21/automatic-document-numbering-using-microsoft-flow/

     

  • SanchezITM Profile Picture
    153 on at

    Wow, I think this is too complex for my case, right?

  • PieterVeenstra Profile Picture
    13 on at

    You will somehow have to control that when two items for the same company are added you will still get unique numbers. That could becoem quite complicated.

  • SanchezITM Profile Picture
    153 on at

    Hi @Pieter_Veenstra what if I count the rows with "Adidas" company and update item "Number" with "A-00"+Result ?

  • PieterVeenstra Profile Picture
    on at

    What do you expect to happen wehen two Adidas items are added very quickly after eachother?

     

    Two flows will be triggered. Then both flows will count the number of items and both items will get the same number of existing items back ... -> something could go wrong.

     

  • PieterVeenstra Profile Picture
    13 on at

    One way to avoid these double IDs would be to create a scheduled flow that looks at your list. Collects all the items without an ID and then hands out the ids as it processes the items. That way there is a single flow handing out the IDs.

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    I'd like to suggest another way to prevent duplicate IDs is to make the column in SharePoint that stores the ID a unique column ("Enforce unique values" in column settings).  That should force the Flow to generate an error.  My suggestion would be to configure a run after action or scope that attempts to assign an ID again (a new ID) after the first failure.

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard