Re: Query Approver Comments in Workflow Tasks

Jump to solution

Just to re-cap, I wanted to target approver comments without getting all of the meta data such as approver name, date, time, etc.

Here is my solution, which is still working for me after several months:

1) First of all, you need to create some variables to store the comments in. Create the following variables:

     a) 'current task ID' - (Type: List Item ID)

     b) 'approval ID collection' - (Type: Collection)

     c) 'current comment' - (Type: Single line of text)

2) Then in the workflow, insert a 'Query List' action. This should query the 'Workflow Tasks' list. Filter should be set to 'ID' is equal to 'current task ID'. Then at the bottom of the action, set 'ApproverComments' field (this is from the Workflow Tasks list) to 'current comment'.

3) Next in the workflow, insert a 'Log in history list' action. In this action, simply insert '{WorkflowVariable:current comment}' (without the apostrophes).

4) Finally, around these two actions insert a 'For Each' action. This should wrap around the two previous action. In this action, under 'Target Collection' put 'approval ID collection,' and under 'Store result in' put 'current task ID.'

Once you have followed the above steps, you should be able to retrieve the approver comment by selecting the 'current comment' variable. For example, you can create a 'send notification' action and simply insert this variable and it'll just show the approver comment without any of the meta data.

Remember it's important to include the 'for each' action and wrap it around the actions outlined in steps 2 and 3, otherwise Nintex will simply put the same approver comment in the 'current comment' variable for all future instances of this action.

Hope that helps. This doc explains it in more detail, with screenshots. Really easy to follow:

How to query for approval comments directly

All the best


Not applicable

Re: Query Approver Comments in Workflow Tasks

Jump to solution

This was very helpful...but I am stuck. Only the last comment is returned for me, not all of the comments together in 1 string.

I have everything save for the 1st approver in an Action Set - the Request Review followed by the For Each loop around the Query List & Log in History Actions. The comments save without all of the metadata.

Then I have the 2nd Action Set, which is identical to the 1st, except it goes to the 2nd reviewer.

After the 2nd review comments I used Set Field Value to update the Comment column in my list. I want it to include both reviewer comments but it only returns the 2nd comment.

I tried a build string instead of the loop/query/log and I did get both "comments" in the field as a string...but I think I got task ids instead, or some other variable not the actual comments.

Here is my workflow (the action sets are actually sequential, not parallel because that errors out):

Then I update the Title of the Current Item (works, no issues), followed by the field update which only returns the 2nd comment.

Can someone please tell me what I am doing wrong ?

0 Kudos

Re: Query Approver Comments in Workflow Tasks

Jump to solution

i am also stuck here kindly help me

0 Kudos