Requirement: Implement automatic numbering in the SharePoint list.
How to create an auto-incrementing number field in a SharePoint list?
Auto-numbering is quite a common requirement when working with SharePoint lists. Say, You may want to auto number list items in SharePoint 2010 issue tracking list! Here are some methods to achieve SharePoint list auto-increment number:
Add Auto number column to list with ID field:
SharePoint Lists have a built-in “ID” column which auto increments. You can simply add this column to your views!
You can rename the ID column if required: How to rename the ID field in SharePoint list?
Using calculated field for Autonumber?
Tried using a calculated column with ID field, entered formula such as = CONCATENATE(“CR-” [ID]), But no luck – Doesn’t work for new items! Because the ID field is filled ONLY after the item is created!
SharePoint Autonumber with Workflows:
Here is my solution to set auto-increment numbers with SharePoint designer workflow! Just follow these steps:
- Create a column, say Request Number of the appropriate type. Make this column hidden: How to make a SharePoint list column hidden?
- Open SharePoint Designer, create new list workflow.
- Add a workflow action: “Update list Item” >> Current Item >> Add >> Set this field to your Target field (Change Request No.), Set value from Current Item:ID field.
- Set the workflow start option to “Start Workflow automatically when an item is created”
- Save and Publish the workflow.
You can also have an Event receiver to set the Autonumber field value programmatically!
Create auto number in SharePoint 2013 with “Counter” list approach:
The idea is to create another list, say “Counter,” with a field to hold your initial counter value. Create a workflow to fetch the counter value and update your base list’s “Auto-number” field. Let the same workflow increment the counter list’s counter field value! Here is my SharePoint designer 2013 autonumber workflow SharePoint Online: Create Unique Auto Increment Column using SharePoint Designer Workflow