SharePoint 2007/10 - How to Filter List Items by Workflow (Approval) Status

In order to filter documents or items in a list by status of the workflow, we can create a new view and set the filter using the column [Workflow Status].
But if we try to insert as a filter "Approved" or "Rejected", we do not get results.

The Workflow Status is stored as a numerical value!
The values ​​are as follows:

Not Started - 0
Failed on Start - 1
In Progress - 2
Error Occurred - 3
Canceled - 4 (manually)
Completed - 5
Failed on Start (retrying) - 6
Error Occurred (retrying) - 7
Canceled - 15 (from workflow)
Approved - 16
Rejected - 17

The correct setting of the filter will then be like the following image:


Pay attention to the values ​​for Canceled!
If the cancellation is done automatically by the Workflow, use the value 15, but if the Workflow is stopped manually by the administrator (eg because of error), then you need to use a value of 4!

Comments

Popular posts from this blog

Sharepoint 2010 - Enable/Disable Ribbon Button with EcmaScript

Sharepoint 2010 - Customizing Quick Launch with pages

SharePoint - Add button Apply to List Item Edit Form for Saving Item without closing form