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)

Requirements:
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.

Solution:
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)

Setup:
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

Type

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

Actions

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 a workflow status in a view (based on a Nintex workflow)

I wrote a post about how to use the workflow status in another workflow or in a view.
When I was changing views on a custom workflow that was created by Nintex I ran into issues.  I wanted to display all items were the workflow was not Approved. So as a logical next step, I would just need to change my view and filter on the status (filter on “is not equal 16”).  But this didn’t work. It showed all items, even the ones that were approved.

I then edited the list in Datasheet and found out that Nintex is using other numbers then SharePoint (or the Workflow Foundation) does.

Apparently Nintex uses these status indicators:

2 In progress
3 Error occurred
4 Cancelled
5 Completed

Nintex Workflow for SharePoint 2010 released

I guess it was not an accident that Nintex released Nintex Workflow 2010 on day 1 of #WPC, the Microsoft Worldwide Partner Conference.

When I was searching for some Nintex video’s on Youtube, I found this very nice video of Mike Fitzmaurice explaining with his well known and recognizable voice what Nintex Workflow 2010 is.

For the readers who are not familiar with Nintex workflow, it adds a drag-and-drop workflow designer, connectivity and advanced workflow features to the Microsoft SharePoint document management and collaboration platform, empowering business users and IT Professionals alike to quickly and easily automate business processes; from a simple leave approval request, to complex integration across external applications and data sources.

The slogan of Nintex is “Worklfow for everyone™” and if you ask me, that’s what they bring

I would like to add or emphasize a really important reason why Nintex Workflow is IMO “better” then a custom development workflow. Release management. When a Visual Studio workflow is ready for production and a WSP (SharePoint Solution) file is produced, you have to go to he release management procedures and processes, and they can be quite hard with SharePoint.

The moment my SharePoint 2010 environment is up and running , I will start to experiment with Nintex Workflow 2010, and if time allows me, I’ll even post about that :-)

I guess it was not an accident that Nintex released Nintex Workflow 2010 on day 1 of #WPC, the Microsoft Worldwide Partner Conference.

When I was searching for some Nintex video’s on Youtube, I found this very nice video of Mike Fitzmaurice explaining with his well known and recognizable voice what Nintex Workflow 2010 is.

For the readers who are not familiar with Nintex workflow, it adds a drag-and-drop workflow designer, connectivity and advanced workflow features to the Microsoft SharePoint document management and collaboration platform, empowering business users and IT Professionals alike to quickly and easily automate business processes; from a simple leave approval request, to complex integration across external applications and data sources.

The slogan of Nintex is “Worklfow for everyone™” and if you ask me, that’s what they bring

 

I would like to add or emphasize a really important reason why Nintex Workflow is IMO “better” then a custom development workflow. Release management. When a Visual Studio workflow is ready for production and a WSP (SharePoint Solution) file is produced, you have to go to he release management procedures and processes, and they can be quite hard with SharePoint.

The moment my SharePoint 2010 environment is up and running , I will start to experiment with Nintex Workflow 2010, and if time allows me, I’ll even post about that :-)

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:

Status

Value

Not Started

0

Failed on Start

1

In Progress

2

Error Occurred

3

Canceled

4

Completed

5

Failed on Start(Retrying)

6

Error Occurred (Retrying)

7

Canceled

15

Approved

16

Rejected

17

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