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

ID Management

Good afternoon,

 

I'm facing a problem with a flow that I'm building and I hope that this community saves me again.

 

I'm building a corporate document management tool in SharePoint and need to implement a numbering system. the problem that I'm facing is that the number system is composed of several prefix that varies depending on the department, discipline, and type of document as per the below example:

brunoplacha_0-1669294726430.png

In this example I have Engineering documents (ENM), that belong to the General (GEN) discipline, but are different in the type of document (Procedure - PRC, Policy - POL, Work Instruction - WIP, Templates - TEM), and here comes the issue that I'm facing, since each code combination shall start on 0001 and but will have independent sequences, so if a PRC document is 0001, the next PRC will be 0002, but a new POL document shall start on 0001. I will have around 150 combinations in the future. I created a separate list (see below) and created some variables in power automate to increment the CurrentIDnumber column and concatenate the title and the number using the FormatMask column for the sequence number, but I can't figure out how to pick the right line in this list based on the item created in my main document library.

brunoplacha_1-1669295344121.png

 

Not sure if I make myself clear, but feel free to contact me for more details that I missed here.

 

Thanks

 

Bruno Placha

1 ACCEPTED SOLUTION

Accepted Solutions
Rhiassuring
Super User
Super User

Hi there, 

 

This is very clear, thank you for the detail. I've done this a lot, it's definitely a requirement in many engineering firms. 

Here's what I do: 

1) Create a "tracking list". All it needs is Title & Counter.

2) When a new document is received, compose the full schema - ie, CC7EU-ENM-GEN-WIP (do this by using a Compose to take each column that identifies part of the schema, and fitting it there - ie ProjectNum-Div-Area-Type)

 

3) Filter Query the schema in "Title" in the list you've created. Ie, Title eq 'Compose'

 

4A) If it DOES NOT exist, have Power Automate create an entry for it in the Title list and set number to 0001; update Counter to 1. Use 0001 as the sequence.

 

4B) If it DOES exist, get number from Counter, add 1, update Number column to to whatever the new sequential number is. 

 

It always seems overwhelming and complicated because it's so many combinations ... but we make Power Automate do the work for us. 

Let me know if I missed any parts in your requirements, but, this is pretty on par with what I've done previously.

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



View solution in original post

4 REPLIES 4
Rhiassuring
Super User
Super User

Hi there, 

 

This is very clear, thank you for the detail. I've done this a lot, it's definitely a requirement in many engineering firms. 

Here's what I do: 

1) Create a "tracking list". All it needs is Title & Counter.

2) When a new document is received, compose the full schema - ie, CC7EU-ENM-GEN-WIP (do this by using a Compose to take each column that identifies part of the schema, and fitting it there - ie ProjectNum-Div-Area-Type)

 

3) Filter Query the schema in "Title" in the list you've created. Ie, Title eq 'Compose'

 

4A) If it DOES NOT exist, have Power Automate create an entry for it in the Title list and set number to 0001; update Counter to 1. Use 0001 as the sequence.

 

4B) If it DOES exist, get number from Counter, add 1, update Number column to to whatever the new sequential number is. 

 

It always seems overwhelming and complicated because it's so many combinations ... but we make Power Automate do the work for us. 

Let me know if I missed any parts in your requirements, but, this is pretty on par with what I've done previously.

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



Thanks a lot for the reply.

 

I know that I'm asking a lot, but could you support me on the flow creation?

 

I have created the below one but I probably made a huge mistake

 

brunoplacha_3-1669373737138.png

 

brunoplacha_2-1669373709576.png

 

 

 

 

It does not give any errors but does not work

 

Thanks in advance,

 

Bruno Placha

 

Rhiassuring
Super User
Super User

Are you able to show me how your individual schema components are defined? 

Like, does it say "ENG" when they select from metadata, or, do they select "engineering" and you look-up to a list to identify it as "ENG"?

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



brunoplacha
Frequent Visitor

it does say ENM

 

brunoplacha_0-1669623624221.png

 

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.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,369)