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

About Patrick Sledz

Patrick works as a consultant. He assists organizations to deliver SharePoint business value and create the awareness in these organizations that only a strong technical team is not sufficient to deliver this added value.
Tagged , , . Bookmark the permalink.