How to collect Multiple approver comments and decisions from one 365 Nintex workflow Approval Task

Document created by shaunlub on Apr 29, 2017
Version 1Show Document
  • View in full screen mode

This is functionality is not available out of the box (yet). But thanks to some pointers from Tomasz Poszytek, here at the Nintex Community. I was able to get this working using the Query List action coupled with the For Each action made this possible. So here is my write-up of this.

  1. Prepare the columns and workflow variables you’ll need:
    Tasks columns The Comments column of the Workflow Tasks list you are using should already be multi-line text column (but you are welcome to setup another column for this purpose). Main List columns The Review Comments (comments) column on your main list should also be set as a multi-line text column. The Reviewer (approver name) column on your main list should also be set as a multi-line text column. NB: I have set these as plain text (just in case). Make sure you have enough lines setup. Workflows will error if there is not enough space in the text column (6 lines is 6x254 characters I believe); the character total is important here; not the no of lines (I think).
    Workflow Variables Collection variables are required to hold the arrays of data queried from the Tasks list: App1-Comment-Coll will hold the Comments input by Approvers App1-Name-Coll will hold the names of the Approvers Text variables are required to hold the individual values we pull from these arrays: App1Comments will hold the comments pulled from the App1-Comment-Coll collection variable App1approver will hold the approver name pulled from the App1-Name-Coll collection variable All-App1-Comments will hold all of the comments in one variable All-App1-Approvers will hold all the names of the approvers in one variable (As you may have gathered, my workflow has multiple approval levels, the above is just for Approval Level 1)
  2. Next we need to change the settings and form on the workflow in the “Start a task process” action. Set to Parallel, and Assign task to each member, Wait for task completion. Completion Criteria: wait for all responses.

    On the task form, make sure the Comments input is a multi-line text box, and that it is linked to the tasks list Comments column (which we will query later).
  3. Now we need to add our actions to the workflow (after the “Start a task process” has completed):
    1. The Query List action - most of these settings are straightforward. Normally the workflow instance will be enough to query the tasks list and pull back the data you need. But if, like me, you have multiple approval tasks using the same tasks list, inside one workflow, you will need another task column to filter. Here I have used the Task Name which should be the same the task Title you set in the “Start at task process” action. You would need to make these different for each “Start at task process” action in your workflow for the query filter to pull in only the values you need and not all approvals in this workflow.

    2. Two For Each actions - one for Comments and one for the Approvers. Here are the settings for the first For Each, which is pulling a comment from the App1-Comment-Coll array and feeding into the App1Comments variable

    Inside each of the For Each loops, you will need a Build String action to rollup these variables into a list:

    Then using an Update List Item action we can update the main list item with the approval results:

    So when one task form has this input:

    ..the main form will show this like this:

    The asterisk I added in the for each loop for comments helps see where each approver’s comments starts.
    (It would be possible to create a variable in here to hold a count number, but this might look strange where there is only one approver. The goal here is to make the workflow flexible – one or multiple approvers are possible for each approval step).
    The order of the Approvers (from top-to-bottom) is the same as for the comments.

     
1 person found this helpful

Attachments

    Outcomes