Cleo
Cleo

Reputation: 1

Automated Number in Custom-List SharePoint Online

Is there a way to automate a number in sharepoint online, custom list? the format is should be like this NUM-(year)-000

For example

NUM-2019-001 
NUM-2019-002
...

so that there's no need for the user to fill this column for the Number of the item.

Upvotes: 0

Views: 1228

Answers (1)

TimW
TimW

Reputation: 156

There is a Document ID feature in SharePoint, however it really only allows you to define a prefix. Potentially you could use it and update it each year, but I think you'd be better off creating a workflow or us MS Flow.

I'd look to do the following:

  1. Create a Site Field under Site Settings - make it a single line text field and enforce unique values but don't make it required
  2. Add the field to the list
  3. Create a workflow for that list and set it to run on Created / New Items
  4. The workflow would update the new field you've added and set the value.

Workflow isn't the easiest thing to use if you haven't used it before. I'd look to configure the workflow to build a few variables. Firstly the year of the current date. Then use the ID of the list item for the last part of your value. eg; it would be formed like "NUM-YYYY-ID". There are commands to read data, get the current date and update the list item from within the workflow designer using SharePoint Designer.

Alternatively you could do a similar thing with MS Flow.

Another option would be a remote event receiver but that's more difficult again and probably overkill for this requirement.

Upvotes: 0

Related Questions