I have parallel actions where on the left branch is the Request Approval task and on right branch is the Store Data action in which I'm trying to store the task id using the variable TaskID.
The problem I'm having is that TaskID is only populated when the approval task is done. I think it should be possible to get hold of the task id as soon as the task item is created. I wanted to pass the task id to another workflow so I can query it when the task is not yet completed. How can I do this?
It's also happening with Request Review task action. I haven't tested it with other task actions.
Solved! Go to Solution.
put a Loop action before the Store Data action. Set the looping condition to loop while the TaskID variable you created is empty. Once the task ID is stored in the variable in the other branch, the loop will stop and the task ID can be stored using the store data action.
I want to capture the Task ID before the task is done. The TaskID is only populated after the task is completed which is too late. A loop will not be able to capture it until the task is done.
ah, i see, sorry, didn't realise the ID is only stored after the approval.
can you use the task name to get the ID of the task by using a query list action on the workflow task list? obviously that will only work if the task name is unique.
in that case the only workaround I can see is, that you query the workflow task list by filtering using the Related Content column in the workflow task list. That contains the item URL. You might have to apply some additional filtering based on other columns if the item URL is not enough. Something like the status, assigned to or creation date. That will do the trick.