How to create a custom ID for lists and libraries

Custom ID column – classic SharePoint

1. Pre-requisites

Before you begin you will naturally need to create either a list or library in SharePoint. You will also need SharePoint Designer 2010 installed to create this system, you can download the 32-bit version from Microsoft here, or the 64-bit version from CNET here.

2. The setup

  • Create a new column, with the type Number – I called this ‘SolIncrementNum
  • Create a new column, with the type Calculated – I called this ‘SolReqNum‘, later renamed ‘Request Number’ in the formula field, add the following: ="SOL-00"&[SolIncrementNum]
  • For the Data Type, select Single line of text
Setting the formula for the solReqNum column in list settings

NOTE: for the Request Number formula if you want to prefix your custom ID with something else just replace what’s between the ” “ in the formula field above.

3. Build the workflow

Next up, we need to connect to the list in SharePoint designer to build our workflow to populate the SolIncrementNum with the SharePoint generated ID of the list item.

  • Open SharePoint Designer 2010 > Press Open Site > Copy and Paste the URL of the site which you are building the system in
  • In SharePoint Designer 2010 under Lists and Libraries > select the list or library in question
  • In the Workflows section press New, then give your workflow a name and description
  • In the workflow designer start typing “pause”, this will add a new action called “Pause for 0 days, 0 hours, 5 minutes”
  • Press enter, underneath the Pause action, start typing “update”, this will give you a new action called “Update item in this list”
  • Press the words “this list” that are underlined (this will open a new window) > make sure the list drop-down is set to Current item
  • Press Add make sure the following fields are set:Set this field: select SolIncrementNum
  • To this value: press the fx button
  • A define workflow lookup window will appear, make sure the following fields are set:
    1. Data source: Current item
    2. Field from source: ID
    3. Return field as: As Double
    4. Press OK
  • Underneath the previous action start typing “Stop”, this will create a new action that stops the workflow and logs a custom message > click on “this message”
  • Enter your custom message, for example: “ID copied successfully”
  • Press Save to save your workflow, then Publish to make it live
  • At the top of the workflow designer canvas there is a breadcrumb menu, press the link before the word “editor” (the name of your workflow)
  • This takes you to the workflows properties, under Start Options > make sure Start workflow automatically when an item is created is checked
  • Save and publish your changes

Now when new items are created within the list or library, the workflow will fire and create a new request number!

Classic SharePoint list with SharePoint Designer workflow that populates Request Number

2 thoughts on “How to create a custom ID for lists and libraries

  1. Juliana December 16, 2020 / 9:31 pm

    Fantastic, worked perfectly, thank you! I needed my IDs to start with D and begin at 10000 so I used formula =”D”&(solIncrementNum+10000) to get D10001.


    • Anthony December 17, 2020 / 5:11 am

      @Juliana really happy to hear this worked for you ☺️


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s