0

Within our SharePoint Enterprise 2013 On-Premise environment we have documents that need to be tagged with codes for example:

  • Procedure Document: P100-001
  • Forms: F100-001

So when a procedure document is upload I would like it to get assigned the next available code, e.g. P100-002.

What is the best approach for this?

EDIT: So it looks like the best solution is to use a workflow, I have created the workflow but unsure of what I need to type

enter image description here

Basically I want a string of text P100- and the add the item ID

Matt Saunders
  • 500
  • 1
  • 8
  • 19
  • I have read that using [ID} in a calculated field is unreliable. Some developers use a workflow to set and add this value on item creation: http://sharepoint.stackexchange.com/questions/22977/how-to-use-calculated-field-to-retrieve-the-id-of-the-item-in-the-sharepoint-200 – Lucas Rodrigues Jan 08 '16 at 16:07
  • Thanks for the reply, how would I write the workflow? – Matt Saunders Jan 08 '16 at 20:58
  • Create an extra column MyID in your list and in a On Create Workflow write the value of ID to it. You can then use MyID savely in Formulas – Danny '365CSI' Engelman Jan 09 '16 at 11:29

2 Answers2

0

You can create custom Document ID column for each document.

Follow this article: Creating a custom Document ID provider

Ronak Patel
  • 3,261
  • 3
  • 23
  • 45
0

Use the Document-ID feature or make ID in a calculated column work.
It is 0 (in Formulas) for newly created items because the ID value is generated after all Formulas are evaluated, so you need one Workflow to write the item ID to another column myID

You can then use a Calculated column

="PO-" & TEXT( [Created] , "yy" ) & TEXT( [MyID] , "000" )

If you need more fancy stuff:

Create unique number with ListItem [ID] and [Today] age in Calculated Column Formula

Danny '365CSI' Engelman
  • 21,176
  • 7
  • 35
  • 79