WorkFlow History on Document Set Landing Page

This seemed like such a no-brainer, I was surprised at the lack of documentation for achieving this functionality. Perhaps because document sets are still relatively new? Eh, who knows. In any case, on with the blogging topic. To begin with, I created a custom content type (with parent document set) and I created a work flow in SharePoint Designer 2010 associated with this content type. These topics are outside the scope of this article, so if you need some guidance on them, ping me. The next step is creating a custom view within the WorkFlow history list. The SharePoint peepz have hidden it somewhat, but you can find it by appending "/Lists/WorkFlow History" onto your site URL. Navigate to the history list's settings and select 'Create View', then select 'Custom View in SharePoint Designer' - SharePoint Designer 2010 should now open.

  1. Give your view a unique name and highlight the XSLTListViewWebPart.
  2. Click the 'Parameters' button in the List View Tools > Options tab of the ribbon and add the following parameter values:
  3. Click the 'Filter' button in the List View Tools > Options tab of the ribbon and add the following values (make sure to set the ListID filter to 'contains' rather than 'equals').
  4. Click the 'Add/Remove Columns' button in the List View Tools > Options tab of the ribbon and select the columns/order you'd like to display, I prefer the following:
  5. Save the View.
  6. Edit the document set landing page template within SharePoint Designer 2010. Navigate to your custom content type, select 'Document Set settings' within the 'Settings' section, select 'Customize the Welcome Page' within the 'Welcome Page' section, and then select 'Edit Page' > 'Edit in SharePoint Designer' from the Page tab of the new window that opens.
  7. Copy the XsltListViewWebPart from the custom view you just created, and paste it into the document set landing page template wherever you prefer. I like the WebPartZone_Bottom. Save the landing page template.
  8. Navigate back to the document set settings 'Customize the Welcome page' section and check the 'Update the Welcome Page of Document Sets inheriting from this content type.' and click OK. (The document set landing page template will not update with your changes until you do so.)
And voila! Navigate to a document set, and you should see the all the workflow history items pertaining to that document set within its landing page. You can then tweak the display values like the web part's title, borders, etc. just by editing the document set template page within the browser.

Since document sets can have multiple work flows as well as multiple instances of a single work flow, it's important to note that this web part will display the history items for ALL work flow instances of any kind associated with this document set.