HowTo: Filter a View based on Workflow Status


One of the known issues with SharePoint 2007 is the inability/quirkiness of filtering a view based on the status of a workflow field. While this is a pain, there is an easy workaround. Simply create the filter and tell it to look for the integer representation of the status value you are looking for, like this:

This will create a filter that returns all “Approved” items. The codes are:

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 * This is defined but I don’t think this value is used
Approved 16
Rejected 17

 

12/19/2007 Update: Filled in list of values using the actual values found in the field definition itself.

5/28/2008 Update: Hit by a flash of the blindingly obvious. If you put the status fields on a view, then view that in the Datasheet mode, it shows you the integer values. I don’t know why I hadn’t seen this before ….

Advertisements

Posted on December 11, 2006, in SharePoint. Bookmark the permalink. 1 Comment.

  1. Thanks, great info! I had been wondering why text values wouldn’t work for quite awhile. The numeric values work great.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

w

Connecting to %s