Create a Unique Item ID in a SharePoint Online List with Nintex Automation Cloud (NAC)

I cannot tell you how many times that I have seen a new item created in SharePoint list with the default Title field empty. You have probably seen this too if you have been working with SharePoint for any length of time. You go to a list view and all the items have an empty Title field (see the image below). So, the empty Title field does not serve much of a purpose in the list.

SharePoint online list with empty Title fields
(SharePoint online list with empty Title fields)

The Title field exists in every list in a SharePoint online site and contains the drop-down action menu for the item. This menu allows you to perform several different actions on the individual list item. Users are also able to click on the Title name and open an individual item form in view mode.

This blog post shows you what I consider to be a process automation best practice of utilizing the Title field as a unique ID field for the list item. In the scenario for this blog post, we are assuming that a new item has just been created in a list called StudentInfo.

Follow the steps below to utilize Nintex Automation Cloud (NAC) workflow actions to create and assign a unique ID to a new item right after it has been created.

  • First go to the List Settings for the list and change the default Column Name for the Title field to something more descriptive. For example, something like Student ID, Order ID, or Request ID.
  • Create a new workflow in Nintex Automation Cloud.
  • Configure the workflow Start Event.
    • Click on the first Start Event action.
    • Start from = SharePoint online
    • Event = SharePoint – New list item
    • Connection = Your previously created connection to your SharePoint online environment
    • SharePoint site URL = Add the URL for you SharePoint online site
    • Click the “Retrieve lists” button.
    • List name = List name = Select the name of your list
  • Add and configure a “Create a text string” action.
    • String components
      • Type in fixed text for the start of your ID. In this example, I entered “SID-“.
      • Click on the blue Insert tab to open the “Insert variables” menu.
      • Click on Start Event and expand the “Start variable” object.
      • Find the ID integer and click Insert.
    • Result = Create and insert a new text workflow variable called txtStudentID (or whatever applies to you situation)
    • In this example, the resulting output in the txtStudentID workflow variable will be something like “SID-1”.
  • Add and configure an “Update items” action.
    • Connection = Your previously created connection to your SharePoint online environment
    • SharePoint site URL = Add the URL for you SharePoint online site
    • List name = Select the name of your list
    • Click the “Add field” button and select the field that stores the unique ID (field name is StudentID in this example).
    • Update type = Items at root level but ignore folders
    • Add a new Condition.
      • Click the “Add conditions” button.
      • When = ID
      • Operator = equals an integer
      • Value = Click the blue Insert tab, go to SharePoint Online, expand the objNewStudentInfo object, and insert the Item ID integer.
      • Click the Close button.
  • This workflow will start when a new item is created in the StudentInfo list. It will then create a unique ID for the item and store it in a text workflow variable. The workflow will finish by updating the Student ID field with the unique ID previously created and stored in the workflow variable.
Nintex Automation Cloud workflow - Create Unique ID - Start Event

Nintex Automation Cloud workflow - Create Unique ID - Create a text string

Nintex Automation Cloud workflow - Create Unique ID - Update Items action

Nintex Automation Cloud workflow - Create Unique ID - Full Workflow

Leave a comment

Website Powered by WordPress.com.

Up ↑