Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to pass value from one activity to another activity?

ak4
Tera Contributor

How to pass value from one activity to another activity?

6 REPLIES 6

Nikhil Phalke
Kilo Guru

Hi,

 

You can use the workflow.scratchpad.variablename to pass value from one activity to another in workflow.

Go through below link for details.

https://community.servicenow.com/community?id=community_question&sys_id=ea424baddb98dbc01dcaf3231f96...

https://docs.servicenow.com/bundle/helsinki-servicenow-platform/page/administer/using-workflows/conc...

 

Regards

Nikhil

asifnoor
Kilo Patron

Hi,

As others already suggested, you have to use workflow.scratchpad

workflow.scratchpad.var_name="value";

Then in the other activity you can access the value

var val = workflow.scratchpad.var_name;

Kindly mark the comment as a correct answer and helpful if this answers your question.