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:
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.
Not sure if I make myself clear, but feel free to contact me for more details that I missed here.
Thanks
Bruno Placha
Solved! Go to Solution.
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.
I answer questions on the forum for 2-3 hours every Thursday!
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.
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
It does not give any errors but does not work
Thanks in advance,
Bruno Placha
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"?
I answer questions on the forum for 2-3 hours every Thursday!
it does say ENM
User | Count |
---|---|
22 | |
15 | |
14 | |
10 | |
9 |
User | Count |
---|---|
43 | |
28 | |
24 | |
23 | |
23 |