How to pass an Input Variable from One Flow to Another
Last updated
Last updated
This step-by-step tutorial will show you how to pass an input variable from one flow to another. This involves creating and configuring variables in both flows and ensuring correct interaction with the Avonni Components Open Flow Dialog.
Scenario: You have a flow that displays a list of Accounts in a data table. When a user clicks a button on an Account row, a flow dialog shows the related Contacts for that Account.
Want to smoothly integrate content from another flow into your current screen flow? The Open Flow Panel interaction lets you display that content seamlessly within a panel, creating a more intuitive and user-friendly experience.
Go to the Target Flow
If you already have a flow you want to use as your target flow, open it in Flow Builder.
If you need to create a new flow to serve as the target, create a new screen flow in Flow Builder.
Create a New Variable Element: Add a new variable element to this target flow. This variable will hold the value passed from the first flow.
Choose the Variable Type:
Text Variable: Select this if you pass textual information or alphanumeric values.
Record Variable: Use this to pass an entire record with its associated field values.
Configure the Variable for Input: Crucially, configure this variable to be available for input. This setting ensures that the variable can receive a value passed from the Open Flow Dialog interaction in the first flow.
In the first flow (the one initiating the process), locate the Avonni Components Open Flow Dialog interaction element. You'll configure this element to open the target flow.
Click "Input Variable": Within the Open Flow Dialog interaction settings, find and click the "Input Variable" button. This will allow you to specify a variable to pass to the target flow.
Enter the Variable Name: In the provided field, carefully enter the exact name of the input variable you created in Step 1 in the target flow. Accuracy is crucial here to ensure the correct variable is populated.
Select the Value to Pass: Choose the specific value you want to send to the target flow. This could be a literal value (like "Hello"), a formula, or a field reference like a record id.
Choose the Value Type: Indicate the data type of the value you pass (Text, Boolean, Date, etc.). This helps ensure compatibility between the flows.
Ensure that the input name matches the name of the variable element created in Step 1 above.
In your target flow, you'll likely have a screen element to display information (like a data table, list view, or display text).
Configure this element to show the relevant data based on the input variable you received from the first flow.
Let's say you want to display a data table of Contacts related to the Account ID passed from the first flow.
Filter the Data:
Configure a Query Data Source and filter by the Account ID equal to the input text variable created in step 1.
Following these steps will enable smooth data transfer between the two flows, ensuring that essential information is accessible and utilized effectively. Remember, correctly configuring variables (respecting the same name) and their accessibility settings is critical to successfully passing values between flows.