Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Workflow script error

DoDo labs___
Mega Sage

Hi!


I am trying to pass a value from one workflow to another workflow, but the child workflow gives an error.

Could someone help me?

 

 

DoDolabs____0-1719574945593.png

This is the parent workflow script (Run script):

workflow.scratchpad.var_manager = true;


This is the child workflow script (Approval - User):

var s = workflow.variables.u_manager;
workflow.scratchpad.var1 = s;

if (s == true)
{
answer.push('556d805fdb489c5089bf0056f3961949');
}

 

Child workflow inputs:

 

DoDolabs____1-1719575070181.png

 

 

 

 

4 REPLIES 4

Dnyaneshwaree
Mega Sage

Hello @DoDo labs___ ,

Hover into the child approval- user activity that posted above, you will see the error logs there like which line or thing has error. Post those ss or image here and also post ss of your whole parent workflow.

Thank you!!

DoDolabs____1-1719577888096.png

 

 

 

DoDolabs____3-1719580043255.png

 

DoDo labs___
Mega Sage

I found the solution to the error message: The 'answer' variable was not declared.

 

This is the new child workflow script:

 

var answer = '';
var s = workflow.variables.u_manager;

if (s == true)
{
answer.push('556d805fdb489c5089bf0056f3961949');
}

 

But I still can't pass the value from the parent workflow to the child workflow.