Prefix list item ID with custom text using Flow or similar?

Brass Contributor

Hi,

 

I have a requirement to prefix list item ID's with custom text - in the old world we would do this with SharePoint Designer. Can we do this with Flow instead?

 

For example rather than item "1" it would be useful to have the ID as "HELP-001" etc.

 

Thanks.

1 Reply

Hi @Chris Cundy,

 

As far as I know, it is not possible to override the ID column value.

 

You can create a new column to store the "HELP-00" / ID column value.  At a high-level, in Flow, you will need:

  • "When an item is created" trigger
  • "Update item" action. 
    • Use the "concat" command to concatenate the prefix and ID column value.
      concat('HELP-00', triggerBody()?['ID'])

If you need to pad the zero's, it can get more complicated. Here is an example:

concat('HELP-', substring(concat('0000', triggerBody()?['ID']), length(string(triggerBody()?['ID'])), 4))

 

Results in: 

clipboard_image_0.png

 

I hope this helps.

 

Norm