Nintex Workflow – Workflows on Surveys
Some of you may have noticed that SharePoint doesn’t give you the option to start workflows on Surveys.
The workaround is to have a scheduled workflow that periodically checks for new survey responses. Designing that into a Nintex Workflow is actually quite simple… as with most things with Nintex Workflow.
Since the plan is to have a scheduled workflow, this type of workflow with query the Survey and look for new responses. To know what a new response is, there needs to be some location where the last processed date is stored. Create a SharePoint list and create a few fields to hold some information.
The NW-SurveyMasterList seen in the image above is just an out of the box SharePoint list and has two fields that could be helpful in processing survey responses. It includes a Number field for the number of responses that have been processed and also a DateTime field for last processed survey response.
The survey that is used can be seen here:
Highlights are two questions in this survey.
Since there are different types of workflow, the workflow I find that is the easiest to schedule is a Site Workflow. This is what will be shown in the rest of this post.
The following at the steps needed to build a workflow to get information from a Survey. NOTE: This will need to be tweaked for each survey, because this workflow is looking for specific questions. You would need to modify this workflow for your own Survey.
Query the Master List
This is done to get the Number of Items we have processed so far, and also the last processed date, so that we can look for all the latest responses.
Query for all New Survey Responses
With the Query List action, it needs to be configured to pull all the fields that will be needed. eg. Created, created by, SurveyResponse1, SurveryResponse2
Each of the fields need to be stored in Collection variables. Since there will be most likely be more than 1 survey response, the collections allow there to be multiple responses. To process each corresponding response, take a look at this post : Iterate through Related Collections
What you then do with each survey response is completely up to you. This process will show you how to get the information you need.
Notice the very small image above of the workflow design. But it gives you an idea of the straightforward design of a workflow like this and how to process the survey responses. Below, in the Downloads sections, download the list templates and the workflow to try it out in your own environment.
Filling in a survey, you can see the two questions:
When the scheduled Site Workflow runs, it does what it needs to do and updated the NW-SurveyMasterList so now it looks like this:
Download the SharePoint List Templates (.zip) – Download
Download the Workflow – Download and import into the Workflow Designer Page