Creating a unique Id in a set format based on information supplied

Occasional Visitor
Hello I need to create a unique I’d that will for a new row created on a share point list based on the information selected when creating a new row.

I have a drop down box to select a content type. The options for this are SVC or SOCAT

Depending on which of these is selected I need to create a unique I’d in the following format.

For SVC it needs to return the following
HL/xxxx/mm
xxxx being a unique number starting at1000 and increment if for every new SVC selected.
mm being the year that the year e.g 21

For SOCAT it need to return the following
HLSC/aaaa/xxx/y
aaaa being a number from a drop down box selected. xxx being a unique I’d starting at 500 and increment if every time a SOCAT is created. B being a letter selected from another drop down box.

Any help would be appreciated
0 Replies