Forum Discussion

Lpertence's avatar
Lpertence
Copper Contributor
Nov 24, 2022

Sequential numbering column based on grouping values from another column

Hello everybody!

 

I have a question for my favourite experts...

 

I'm in a SharePoint document library where I'm trying to build a document control system.

I want to have a column that shows an ID code for each document.

ID_Code example: SOP-QUA-010

Which is a kind of concatenated text from 3 others columns.

SOP is from an option column called DocumentType.

QUA is from an option column called Area.

 Until I think I'm ok, the problem is with the ending numbers.

 

I would like to give a sequential number based on the columns Area and DocumentType.

example:

If I insert a new SOP from the Quality Area (QUA) the ID_Code would be: SOP-QUA-011

 

If I insert a new WI (Work Instruction) from QUA, ID-Code would be WI-QUA-001 (001 because it was the first work instruction for the quality area).

 

If insert new doc SOP from Operational Area (OP), ID-Code would be: SOP-OP-001 (001 because it was the first SOP for the operational area).

 

If anyone can give me some direction on how to create a sequencing increasing number based on grouping values (Text) from columns Areas and document type it would be really great.

 

Thank you all and have a great day

2 Replies

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    Lpertence you're going to need to look at using Power Automate for this as a SharePoint calculated column can't get the maximum value of a column and add 1 to it.

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User

    • Lpertence's avatar
      Lpertence
      Copper Contributor
      Hi RobElliott.
      I was expecting that would be necessary to use power automate.
      Do you have a link where I can find the necessary flow?

Resources