How can we capture the task number in workflow scratchpad object

AkashD462166574
Tera Contributor

I have configured the workflow such that when the condition is true, four tasks are triggered sequentially. I have written a script in the advanced section of Task3 to fetch the task number, but when I check the log, the value is empty.

gs.log('Task 3: Script executed');
workflow.scratchpad.task3Number = task.number;
gs.log('Task 3: Captured task number: ' + workflow.scratchpad.task3Number);
Can anyone please suggest if this script is correct or if I need to modify it?
1 REPLY 1

Sanjay191
Tera Sage

Hello @AkashD462166574 
Please check with using getValue() whether is it working or not.
and check the context of the workflow where is it give error something like that 

let me know if anything else and share me the screenshot of the workflow
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You