The CreatorCon Call for Content is officially open! Get started here.

Passing a variable value from subflow to Parent Flow

kuttti
Kilo Guru

Hello All,  I need to pass variable value  from "sub-workflow" to "parent-workflow".

Can anyone help me in achieving this.

 

Thanks!

9 REPLIES 9

Hello,

yes, thank you for copying and pasting the response here:

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

The individual above did not asking for multiple values to be mapped back, if they would have, I would cover that...

Instead you did not cite the source, thus pretending that it's your own.

Please give credit where credit is to to other posts...


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

kuttti
Kilo Guru

Hello All,

After trying all the above methods I realized that i misunderstood my requirement. My actual requirement is below

I have two wf A and B. A is Parent and B is child(Subflow). Actually B wf has 5 catalog tasks at third catalog task  a variable for instance "sample" is visible and mandatory(on RITM too). But this variable is not showing when wf B is triggered as subflow from Parent A.

 

Any help is appreciated.

 

Thank you!

 

Hi,

 

I want to add one more point to @Allen A point while passing value from Subflow to parent flow we use Return Value activity in workflow just give a value like ${workflow.scratchpad.variable_name} in subflow.

find_real_file.png  

and in parent workflow specify scratchpad variable of subflow in Map return value to -: workflow.scratchpad.v1

find_real_file.png

 

Thanks,

Kunal

Hi Kunal,

Your response is helpul. This is all we have to do in passing a value to parent flow from subflow? or do we need to do any other extra step like below after performing above steps

in run script in Parent flow - current.variables.v2 = workflow.scractpad.v1 ??

 

Thanks!

Kutti...this is a completely different question altogether?

Not sure how that happened, but you may be best creating a new question so that the conversation can continue effectively there. Here, it's about the issue you made above.

Please mark my reply above as Helpful & Correct as far as using those methods to carry a subflow value back to the parent.

Create a new question and we can assist you there?

Thanks


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!