cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LuisPertence
Frequent Visitor

SharePoint Document Library Formula Sequential Numbering unique to each prefix

Hello Everybody!
 

I am trying to create a column that will auto-populate a document number sequentially based on the prefixes when an item is created. I want the final numbering to look like this:

Are/DocType/Numb.

_____________________

FIN-FOR-001

FIN-FOR-002

FIN-PRO-001

FIN-PRO-001

HS-FOR-001

HS-FOR-002

HS-PRO-001

HS-PRO-002

 

I have one column called Department (i.e FIN, HS) and one column called Document Type (i.e FOR and PRO) and I am able to concatenate those two columns and use the ID as the number but this won't give me a sequential number based for each unique prefix arrangement. It will only give me the ID. 

 

Thank you and have a great day.

2 REPLIES 2
Andrew_J
Helper II
Helper II

@LuisPertence 

 

I think I understand this and have undertaken something similar myself this week.

 

The ID column will do all the leg work on sequential side, i.e. 1, 2, 3 etc.

 

Andrew_J_2-1669295018347.png

Maybe the above will help.  I would concatenate at the fee number in my example.

 

Then use us the below to create the library.

 

Andrew_J_1-1669294781840.png

I hope the above helps you out.

 

Regards,

 

Andrew

grantjenkins
Community Champion
Community Champion

Just confirming - is this for a List or Library?

 

If it's for a List, then can give you a fairly nice solution as you MUST enter all required fields before you can save the item.

 

If it's for a Library, then it gets more complicated as you can upload a file and the metadata (including required fields) won't be added initially. So, if you're trigger is When a file is created, it likely won't have the Department or Document Type values to build the unique id.



----------------------------------------------------------------------

If I've answered your question, please mark the post as Solved.

If you like my response, please consider giving it a Thumbs Up.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,760)