I am trying to create a report (exportable to Excel or viewable online) that will display all workflow comments for a particular list item. I can click on each individual workflow and see the history, but I'd like to combine all instances of that workflow for a particular list item and be able to export it. I want to analyze the comments left by the users to determine if there are any common issues that my users are experiencing with the automated business process.
I found the hidden workflow history list. I think this could be a good source of the data, but I'm not sure. It is also listed by GUID so the filters aren't user friendly. Ideally, I'd be able to pick a list item and a workflow and see all the history. I'd be able to export it to Excel or view it online.
Solved! Go to Solution.
After a lot of research, I am pretty sure I found a solution that works for me. I implemented this in a couple of ways. First, the easiest. Create a view in the Workflow History List. This solution works if the person has the appropriate permissions.
My original requirement was to create an report of all actions on all list items for a particular workflow. It should be able to be exported to Excel for further analysis. My user wanted to analyze the comments of the approval process to identify similar traits on the approved or rejected items. By using the SharePoint REST services and an application called Postman (http://www.getpostman.com/), I was able to determine the GUID of the workflow that I wanted to report on. I noticed that each version of the workflow shared a BaseId so I was able to get all history of all versions of the workflow for each list item.
The REST call I made is:
http://[SP Web URL]/_api/web/lists/getbytitle('[Title of List]')/WorkflowAssociations?$filter=startswith(Name,'[Workflow Name]')&$orderby=Name%20asc
[Hint: In Postman, add a header to return JSON Accept=application/json;odata=verbose]
Once the data is returned, you will see a BaseId field. That is the base template for all version of your workflow. Save that GUID.
Next - open the Workflow History list. You can fine it by going to your SP Web settings and then under Nintex, find the link that says, "Manage workflow history lists"
I opened the NintexWorkflowHistory list and created a view that viltered the WorkflowTemplateID by the BaseId. I also set the Entry Type to 6 since that seemed to be only the Approve/Reject comments, which is what we wanted.