How pass variable of on workflow to another workflow

Rajababu
Giga Guru

Hi ,

I need help on to understand logic and workfing functional of workflow .

How many ways to pass one variable of worfklow to another workflow ,and second will trigger then first workflow get the final variable ?

**Community link already checked points which i get it below :

1- workflow.scratchpad.variable = var xyz ---> from first workflow but i dont know when and how i will use it to second workflow.

 

2-edit input where you need to create variable ${xyz} and pass to second workflow --> but i dont know how it will work.

3- By using BR 

 

1 ACCEPTED SOLUTION

Namrata Khabale
Giga Guru

Hey Rajababu,

In addition to @Anil Shewale   and @Vishakha Pradhan 

Refer the below Link also For workflow.scratchpad.variable:

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

 

For Edit Input Refer the Screenshots:

Parent workflow:

find_real_file.png

 

Then in childworkflow:

Create Edit input:

find_real_file.png

Create variable.

After that access parent variable value in child:

 

find_real_file.png

 

Value which is get from parent will access like above.

u_val is my input variable internal name.

And lastly when we are attaching subflow to parent there will have to insert value to pass to subflow.

find_real_file.png

Val is my input variable name.

 

 

For  accessing via Business Rule:

Refer the Link:

https://docs.servicenow.com/bundle/orlando-application-development/page/script/useful-scripts/refere...

 

 

Also Go through:

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

 

 

Mark correct and helpful if it resolves your issue!!!

 

 

Best Regards,

Namrata.

View solution in original post

3 REPLIES 3

Anil Shewale
Mega Guru

Hi Rajababu

refer the following thread:it might help you.

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

workflow input variables:

Workflow variables are external values that are passed into and referenced by a workflow during its execution.

 

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

 

If it help mark helpful or correct 

Thanks and regards

Anil

Vishakha
Mega Guru

Hi Rajababu,

Refer below link to better understanding of  workflow.scratchpad.variable:

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

Using variables in a workflow:

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/using-workflows/conce...

 

Regards,

Vishakha

Namrata Khabale
Giga Guru

Hey Rajababu,

In addition to @Anil Shewale   and @Vishakha Pradhan 

Refer the below Link also For workflow.scratchpad.variable:

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

 

For Edit Input Refer the Screenshots:

Parent workflow:

find_real_file.png

 

Then in childworkflow:

Create Edit input:

find_real_file.png

Create variable.

After that access parent variable value in child:

 

find_real_file.png

 

Value which is get from parent will access like above.

u_val is my input variable internal name.

And lastly when we are attaching subflow to parent there will have to insert value to pass to subflow.

find_real_file.png

Val is my input variable name.

 

 

For  accessing via Business Rule:

Refer the Link:

https://docs.servicenow.com/bundle/orlando-application-development/page/script/useful-scripts/refere...

 

 

Also Go through:

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

 

 

Mark correct and helpful if it resolves your issue!!!

 

 

Best Regards,

Namrata.