How to Pass Multiple Selected Records from a Dynamic Component to a Screen Flow
Last updated
Was this helpful?
Last updated
Was this helpful?
Learn to send a collection of records (e.g., rows selected in a Data Table) from your Avonni Dynamic Component into a Screen Flow launched via "Open Flow Dialog" or "Open Flow Panel." This guide covers setting up the Flow's input collection variable and mapping the selection in the interaction
Before proceeding, ensure the Screen Flow you intend to launch has a Collection Variable configured to receive the selected records. In the Flow Builder, this variable must have "Allow multiple values (collection)" and "Available for Input" checked. (A Text
data type is commonly used for passing record IDs). This setup is required so you can map the selected records to this variable in the interaction settings
Ensure Multi-Select is Enabled: Select the component where users will choose multiple records (e.g., your Avonni Data Table). In its Properties Panel, ensure the setting allowing multiple row selection is enabled.
Note the API Name: Confirm the API Name of this Data Table (e.g., OpportunityTable
), as you'll need it in Step 4
Add the component users will click to start the process. This is usually an Avonni Button placed near your data component, or a Header Action configured directly within the Data Table's header properties.
Give this button/action a clear Label (e.g., "Process Selected Opportunities", "Update Statuses")
Select the Button or Header Action you created in Step 2.
In the Properties Panel, go to the Interactions section.
Choose the event to trigger the Flow (typically On Click).
Click Add Action.
Set the Action Type to either Open Flow Dialog
or Open Flow Panel
.
In the Flow API Name setting, select the specific Screen Flow you prepared earlier (the one containing the input collection variable – see Prerequisite section).
This is crucial in connecting the Data Table's selection to the Flow. Within the configuration settings for the "Open Flow Dialog/Panel" action you just added:
Find the Input Variables section.
Click the "Add Item" button to create a mapping.
Input Name: From the dropdown list, select the API Name of the Collection Variable you created inside your Screen Flow (marked as 'Available for Input' in the prerequisite step).
Value: Click the resource selector icon next to the value field.
Choose Component Attribute.
Select your Data Table component (using its API Name, e.g., OpportunityTable
).
Choose the attribute that holds the selected row data:
selectedRowsKeyValue
: Use this if your Flow's input collection variable is of type Text
and you want to pass only the record IDs. This is the most frequent use case.