In a workflow, how to pass data to and from a subflow?

Michael Butak1
Tera Contributor

Hello,

I am trying to call a subflow from a parent workflow.  I am having issues both passing variables TO the subflow and returning variables FROM the subflow.  

Passing variables TO the subflow:
I have created an input with column name "u_requested_for_company", but I have not discovered how to actually pass a value from the parent workflow to that input.  (it might be a permissions issue because I don't see any fields when I add a subflow in the workflow editor:
)

Also, I have return values in the subflow (returning either "Approved" or "Cancelled") but in the conditions for the activity calling that subflow, I don't know how to access "Approved" correctly.  For example, activity.result == "Approved" doesn't evaluate to true if the subflow returns "Approved."  

Thank you.

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hi,

Please refer to documentation for passing variables to a subflow: https://docs.servicenow.com/en-US/bundle/sandiego-servicenow-platform/page/administer/workflow-activ...

Passing a value from subflow back to parent via: https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/administer/workflow-activities/...

Please refer to the above and then let us know where specifically you may be having trouble. Please embed screenshots as well.

Please mark reply as Helpful/Correct, if applicable. Thanks!


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

View solution in original post

1 REPLY 1

Allen Andreas
Administrator
Administrator

Hi,

Please refer to documentation for passing variables to a subflow: https://docs.servicenow.com/en-US/bundle/sandiego-servicenow-platform/page/administer/workflow-activ...

Passing a value from subflow back to parent via: https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/administer/workflow-activities/...

Please refer to the above and then let us know where specifically you may be having trouble. Please embed screenshots as well.

Please mark reply as Helpful/Correct, if applicable. Thanks!


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