When a new item is created, i would like to auto populate a field that contains e.g. PRC245778

I have tried using a calculated field, based on the ID but this breaks when i add the next item e.g. ="PRC"& [ID]

I then tried doing a workflow, this works but then when i get redirected to the list of items, you can see that the required column needs updating. I have to refresh the page in order to see the incremented number and text. The workflow runs when an item is created.

Are there any other solutions. i have seen event receivers but i am not a strong coder so i am trying to avoid using this.



A calculated column will not work as the ID is not assigned until the item is saved. (I.e. Null while adding the new item)

A workflow will always run asynchronously, so the user will usually not see the new number until the page is refreshed. I have dealt with this by setting the default value for the column to "Refresh to see ID".

The custom event receivers in SharePoint Online have issues.

You could add some JavaScript to the New Item form that makes a web service call to get the last ID number and increases it by 1. This won't help in a Dataview or the modern UI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.