1

We have a document library with many content types. They can all go through the same workflow with status updated into a column "Standard Approval". Not all documents go through the workflow, so I want to make a view that only shows document that have any status.

The Standard Approval column is not available for filtering when I create a view. Any idea why? Or how to fix it? The column was automatically added to the library when the workflow was associated.

I tried making a calculated column that returns T/F based on Standard Approval being empty or not, but that also did not work.

4 Answers 4

7

Try filter by numbers:

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

I also used my own statuses so added "Not equal 18", "Not equal 19", etc.

Answer found here: https://social.technet.microsoft.com/Forums/office/en-US/2eb9dccb-43e4-412b-aae9-f6f0ab0bece1/cannot-filter-on-workflow-status-column?forum=sharepointgeneral

2
  • 1
    Cheers this worked for me, minor point to note though for anyone else reading this you only have to put the number e.g. 5 not complete 5. (I think I was just being simple.) Cheers for the good answer. Commented Oct 4, 2017 at 8:15
  • Hi @user3271150! You are welcome! :)
    – Gennady G
    Commented Oct 4, 2017 at 11:36
1

Any WorkflowStatus can be used for sorting and grouping, but not filtering.

ContentType can be used for filtering, but not grouping.

The solution is to build the view one way, then manually modify the View

  1. Using normal view editing in browser, set the following:

    a. Filter=ContentType

    b. Group=MyWorkflowStatus

  2. Open the aspx View file in SharePoint Designer (I used 2013).

    <Query>
        <GroupBy Collapse="TRUE" GroupLimit="30">
            <FieldRef Name="MyWorkflowStatus"/>
        </GroupBy>
        <Where>
            <IsNotNull>
                <FieldRef Name="ContentType"/>
            </IsNotNull>
        </Where>
    </Query>
    
  3. Modify the fields as needed. In my case, I swapped the two FieldRefs.

1

That blog is private, you can find the info here; https://blog.splibrarian.com/2013/08/22/filtering-views/

Here’s a quick list of the workflow states I typically filter against:

  • Not Started = 0
  • In Progress = 2
  • Error Occurred = 3
  • Approved = 16
-4

This did the trick for me when filtering by workflow status: http://adayinsharepointv3.blogspot.com/2012/08/filter-list-view-by-sharepoint-workflow.html

1
  • The URL in the link requires you to sign up first, too. Not a valid SO answer.
    – Newclique
    Commented Jun 6, 2018 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.