Flow variable passed to subflow from parent flow

Anubhav24
Mega Sage
Mega Sage

Hi All,

 

I have created two flow variables one in parent flow and other in subflow , how do I pass the value of this flow variable from parent to subflow and subflow to parent.

 

Thanks in advance

 

3 REPLIES 3

Hayo Lubbers
Kilo Sage

Hi @Anubhav24 ,

 

The input and output variables of your subflow are probably what you're looking for.

When defining the input variables in your subflow, you can populate these variable(s) when adding the subflow to your parent flow.

When the flow ends, you feed back the output variables to your parent flow.

 

Regards,

Hayo

Hi @Hayo Lubbers ,

Thanks a lot for your reply, however my query is still not resolved yet. I have created below flow variable.

Anubhav24_0-1722491948824.png

 

And under output , i do not see this variable to be sent as output to the main flow.

Anubhav24_1-1722492062290.png

 

 

 

Hi @Anubhav24 ,

 

There is a difference between flow variables and the input/output variables of a subflow. Explaining this, would be too much for this community, but luckily they already did at the NowLearning:

https://nowlearning.servicenow.com/lxp/en/now-platform/flow-designer-fundamentals?id=learning_path_p...

 

And mainly part #3 regarding flows and subflows.