Monday, June 15, 2009

Filter SharePoint List by Workflow Status

Often we need to filter a SharePoint list by  the status of a workflow.

This is rather simple and can be done in the same way as filtering any other field.

The only thing you need to know is that the status of the workflow is an integer, not a text.  So we can’t add a filter like ‘Workflow name’ IS EQUAL TO ‘In Progress’

The following list gives the integer values of each status.
This data can also be used within InfoPath to change the layout of the form depending on the status of the workflow.

A blog was written earlier how to do this:
http://blueinfopath.blogspot.com/2008/11/how-to-make-infopath-forms-readonly.html



List of Workflow statuses

  • 0 - Starting
  • 1 - Failed on Start
  • 2 - In Progress
  • 3 - Error Occurred
  • 4 - Canceled
  • 5 - Completed
  • 6 - Failed on Start (retrying)
  • 7 - Error Occurred (retrying
  • 15 - Canceled
  • 16 - Approved
  • 17 - Rejected

  • 3 comments:

    Unknown said...

    Thank you! After my filter attempt failed, I suspected there would be an integer value instead of text. This list was incredibly helpful.

    Unknown said...

    thanks buddy :)
    I was lookin 4 this

    Unknown said...

    I am not trying to give an image of a fairytale, perfect, everything else, I am just being myself. See the link below for more info.

    #trying
    www.ufgop.org