How to get a unique Project Number between different Enterprise Project Types

Posted By Posted by: Ahmed Taee on June 14, 2019

I was faced with a requirement to produce unique project numbers in sequence despite of the project EPT type. Project numbers such as: PPMxxxxxx (x are consecutive numbers starting from 000001).

Requirements

  • Project Server 2016 or Project Online.
  • SharePoint Designer 2013.

So this was the approach I took in producing the unique project numbers:

  1.  Create a custom SharePoint list in your PWA e.g. “PS Unique Number”
  1. Make the column “Title” not required and create a new column called “Project Number” (with a number field type) and add a second column “Project Name” (with a text field type).
  2. Create the first entry with the number you wish to start with. A minimum of one entry is mandatory! And make sure the “Project Name” field is not empty (for the sake of completing this process, just enter PPM).
  1. Create an enterprise project level custom field called “Project Number” and set the field type to Number.
  1. And now, create an enterprise project level custom field called “Project#” and set the field type to Formula. This formula concatenate a prefix (in this case “PPM”) with the auto-incremented number. This allows the zeros to stay in place.
  1. In the Site Workflow, set up the below.

To describe each actions from the Workflow above, here are the break downs:

Action 1 
Only set a project number if it wasn’t previously set.

Action 2 
Look for the next consecutive number from the SharePoint list “PS Unique Number:Project Number” and insert the variable to “varProjectNumber”.

The workflow will look in the data source “PS Unique Number” and retrieve the “Project Number” as Double.

And this is where the role of “PPM” value comes in. To find the next consecutive and available number, the workflow will retrieve it from the first entry which has “PPM” value in the “Project Name” column. As we have set up only one entry with “PPM”, it will retrieve the number accordingly.

Action 3 
Set the custom field “Project Number” to the variable “varProjectNumber” mentioned on the previous action.

Action 4 
Update the entry in the SharePoint list and replace the “PPM” with the actual project name. Later we will create a new list item with a name “PPM”.

Action 5 
In this example, we increment the variable by 1.

Action 6
Create a new line item in the SharePoint list, setting the Project Name to “PPM” and the Project Number to what will be the next available number.

Action 7 
Publish the project to populate the Project# with value.


Blog Posted In Blog Posted In: Uncategorized
Blog Posted In