How to Set the Same Flow Variables in a Subflow as in the Main Flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 09:18 PM
I have linked multiple subflows to a flow. If anyone knows how to set the same flow variables in a subflow as in the main flow, please let me know.
I’ve specified the Consumer record, which triggers this flow, as the flow variable, so I want to pass the same data to the subflow.
Flow
Subflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 10:23 PM
Hi Soki,
You need to create input variable first in Subflow then map it to parent Flow variable. Try this way
Say variable_test as Flow variable is in Flow and var_test Input variable created in Subflow. Then, under the Inputs section of the subflow, map:
• variable_test from the main flow to the var_test input in the subflow.
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 11:47 PM
Hello @Soki Ando,
Please find the below link and let me know whether it is useful or not.
https://developer.servicenow.com/dev.do#!/learn/learning-plans/washingtondc/servicenow_application_d...
Thanks
SP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 12:09 AM
Hi @Soki Ando ,
1. Create Flow variable first in both Parent Flow and Sub flow.
For your reference I am using Incident Table Here.
In Main Flow:
In Sub flow:
2. Now create one input variable in Sub flow (Variable 1)
3. Update the Parent Flow variable with respective Data. (Using 'Set Flow variables' action)
4. Call this Sub flow in Parent Flow and pass the 'Parent Flow Variable' to Subflow.
5. Now you passed the Parent flow variable to Sub flow. If you want the Sub flow variable also to be same. Use 'Set Flow Variables' action in Sub flow and update the value with input 'variable1'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 12:26 AM