Creating an unique approval number in a workflow

I was working on a workflow that assigns a unique approval number to an approved item. Despite the fact I made this workflow using Nintex, it is possible to create this workflow with SharePoint Designer (using the calculate function)

We have a list, where users can fill in a request to increase the quota of their site. The governance has decided that the IT department is responsible for the capacity, hence they need to be the approver of this request.
When a request has been approved, it should receive a unique approval number. The rest of the process is not relevant for this blog post.

By using a combination of the ‘created date’ and the list item ID we can create a unique number. It was not required to use sequential number (was even preferred not to do this)

In the custom list there are a lot of columns, but these are the once I have used to calculate a unique value for the approval number

Column name


Year Calculated value : =TEXT((Created),”yyyy”)
Month Calculated value : =TEXT((Created),”mm”)
Day Calculated value : =TEXT((Created),”dd”)
ApprovalPart1 Calculated value: =DATE(Year,Month,Day)

Workflow variables:

ApprovalCalc : Text
ApprovalNumber: Number


In Nintex I created a Math Operation. It is configured to do “(Listlookup Current Item Approvalpart1) + (Listlookup Current Item ID)”.
This will result in having a number that is formed by  the number of days of the creation date (based on December 31 1899 being value 1) added with the itemID.
This value will be stored in the ApprovalCalc variable.
Then we have a build dynamic string action that build a string “STS- {WorkflowVariable:ApprovalCalc} and stored this value in the ApprovalNumber variable. (IT people wanted to have a prefix STS-).
The next action updates a list item called Approval_Number with the value of the ApprovalNumber variable and then other actions like sending emails and creating tasks is executed.

SharePoint Workflow Status: how to use the workflow status in a workflow (or a view)?

Recently I had to configure a SharePoint workflow where an item had to be copied to another list when the Approval Workflow status is approved. It was ok to start the workflow manually. The workflow had to be created in SharePoint Designer 2007, since no other specialized workflow software is/was available.

The problem I had was that when I assigned a condition that would check if the Approval Status equals Approved. But this doesn’t work when you use this condition, it will be skipped, because internally SharePoint uses a number for the workflow status.

Also, if you Edit in Datasheet (your list or Library) you can see the numbers is stead of the text.

Here is an overview:



Not Started


Failed on Start


In Progress


Error Occurred






Failed on Start(Retrying)


Error Occurred (Retrying)








So, I need to modify my workflow like : If Approval Status Equals 16, ….

The same policy applies when you would like to have a view where you display items based on their Approval Workflow Status.

This list is partially copied from David Wise blog