I have setup a workflow so that it queries the approver comments in the 'Workflow Tasks' list on the same SharePoint site. The workflow then puts this value into a variable called 'vApproverComment', so that it can then be included on a notification e-mail that's sent to the initiator.
The problem I'm facing is that while this works for the first instance of the workflow, I am not able to retrieve any approver comments that are given later on in the workflow.
In the 'Query List' action, I have the following filters:
Workflow Item ID = ID
Workflow List ID = List ID
Workflow Instance ID = Workflow Instance ID
(In the above, the first value in each line is from the Workflow Tasks list, and the second value is from my main list).
I just can't seem to be able to target the approver comment for each FlexiTask, but rather only the first one for the whole workflow.
Any help would be hugely appreciated. I can upload a copy of the workflow if need be.
Solved! Go to Solution.
There are built in variables that already exist within the workflow that do just this. No need to query. (Note I am using On-prem edition - O365 may vary). They are under the common tab:
Hi Mike - Sorry, I should have been clearer. I already know about these in-built references. The problem with them is that they give lots of meta data (username, date, time) before the comment itself. I want to target just the comment.
I make sure that the task name is unique and query the task list based on the name.
I usually put the item ID from the library where the workflow is running as the start of the task name.
Then when you query you can look for the ID in the begging of the name.
Use filters to get the comment that you want.
If you can select a Correct Answer, that'd be helpful for the Community when others search for this same type of info. Thanks, Shaun Guyver!
Your community manager