0

My team is trying to create a custom ID column for our SharePoint 2010 list. The column should show YYMMDD-ID, with YYMMDD the date the item was created and ID the ID of the item. I tried using =[DateCreated]&"-"&[ID] in a custom column which worked until you update the item and then the ID number disappeared. I researched that since ID is not a string this happens and the workaround is to create a workflow.

I'm unsure on how to do this, has anyone ever created something like this before? Is there a way of just using a custom column?

My team appeciates any help!

  • I don't know if this will help or not, but I have generally found using the ampersand for string concatenation in Calculated columns is problematic. I always recommend using the CONCATENATE function instead. For example =CONCATENATE([DateCreated],"-",[ID]). You could even try combining this with the numeric conversion function TEXT, for example: =CONCATENATE([DateCreated],"-",TEXT([ID])) – willman Jan 8 at 19:30
  • 1
    Indeed workflow is better and reliable workaround for such requirements. because workflow runs after item creation (after item ID is generated) so you can set your custom ID in workflow. – Ganesh Sanap Jan 9 at 4:27
0

You can do as the followings:

  1. Create a column named "custom ID" in your list
  2. Create a SharePoint workflow with SharePoint Designer 2010
  3. Insert "Set Field in CurrentItem" and set it like the below: enter image description here

  4. set the workflow automatically start when an item is created: enter image description here

  5. Publish the workflow
| improve this answer | |

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.