No code solution: Unique project number with a SharePoint workflow

It’s been a while and it was a bit quiet here but waiting was worth it, I have a goody for you!

Remember your last monthly project review meeting? “Carl, can you tell me the status of D383C8B5-2D21-E311-8F18-005056956A39? I heard we are a bit behind the schedule but the customer is impressed by the quality. Ah, and what about 9EA5DD28-8032-E311-867F-005056956A39, the gate review is next week and I need the status slides”

Doesn’t sound familiar? Good, because people don’t like cryptic GUIDs, they like names like Panther, Lion and Maverick for their project and sometimes just a nice number which goes along with it.

It’s hard to find any solution for that requirement beside some solution starter or using your development skills and build your own solution with Visual Studio. Now with Project Server 2013 / Project Online and the more powerful workflow engine we can build now our own no-code solution simply with a SharePoint Designer workflow for Project Server 2013.

All you need is

  • Project Server 2013 or Project Online (Don’t have it yet? Get your free trial from Campana & Schott, send a mail to or contact me directly)
  • SharePoint Designer 2013 (free, you can download it here)
  • And these instructions

The solution

1) Create a custom SharePoint list in your PWA e.g. “Project Server Unique Number”

Project Server Unique Number SharePoint list

2) Rename the column “Title” in “Project Number” (I think it’s more convenient) and add a second column “Project Name”

3) Create the first entry with the starting number. One entry is mandatory! It’s your first number and the Project Name field cannot be empty (We come to that later)

SharePoint list view

4) Now create an enterprise custom field called “Project Number”

Enterprise custom field Project Number

I am using a text field here to be more flexible regarding the numbering format. E.g. if I want to add a character or the abbreviation of a business unit in front of it.

5) Set up this workflow

Workflow Unique Project Number

And now the workflow itself, action by action

Action 1) We want to write back to an enterprise custom fields so the project has to be checked in in advance.

Action 2) We only want to set a project number if it was not set before

Action 3) We read the next consecutive number from the SharePoint list and set the variable varProjectNumber to it

Workflow Unique Project Number action

And this is where the “na” comes in. The workflow looks in the data source “Project Server Unique Number” and gets back the “Project Number” as Double.

To find the next consecutive and free number the workflow is looking for “na” in the column “Project Name”. There is only one entry with “na” so he will retrieve the according number. (Otherwise he would retrieve the first entry which has “na” in the column “Project Name”.

Action 4) We write the number to the enterprise custom field “Project Number”

Action 5) We update the entry in the SharePoint list and replace the “na” with the actual project name. It does look better and we make sure there is always only one item with “na”

Workflow Unique Project Number

Action 6) In this example I simply add 1 to the number resulting in a consecutive numbering system

Action 7) A new line in the SharePoint list will be created with the next available number

Workflow Unique Project Number

After creating three projects the Project Center would look like this

Project Center view with unique project number

While the SharePoint list would look like this and the workflow would pick up number 1003 for the next project created.

SharePoint list view with created unique project numbers

With this approach you are quite flexible like adding characters to the numbers, having different numbering systems per department and so on.

And just to be sure on this: those steps can be easily embedded in a multi-step approval workflow as well, it does not have to end with one stage like in this example 😉


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s