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 ….

Leave a Reply