Thursday, August 16, 2007

How to filter a SharePoint list or library by workflow (approval) status

Interesting article on workflow approval status filtering.

=======================================
Recently I had a client who wanted to show only "Approved" documents (i.e. documents that had been through the built-in Approval workflow) on a site's home page. When I tried to set up the filter, setting the [Workflow Status] field to Approved, the filter returned no results. As it turns out, workflow status is stored as a numeric value.

The values are as follows:
In Progress - 2

Complete - 5

Canceled - 15

Approved - 16

Rejected - 17

The view filter needs to look like this:

4 comments:

  1. Excellent find dude. Keep such posts coming in.

    Thanks a ton,

    Anand

    ReplyDelete
  2. This works great to show approved documents.

    What I found is
    1. Document Version 1 - is approved and shows in the view

    2. Document is changed and now becomes Document Version 2 - is in the Workflow process

    3. This view shows Document Version 2 - before it is approved. I should still only see the document that is approved - however, this is not the case, I see the unapproved version.

    How do I get Document Version 2 to not be shown in this view until it is approved?

    ReplyDelete
  3. I cannot believe this is still the case in SharePoint 2010!!!

    Thanks very much for posting this!

    ReplyDelete
  4. Even after all these years, this post is still valid! Thanks for solving a mystery!

    ReplyDelete