# Passing multiple record IDs to another flow

## Use Case

With the [**Avonni Data Table**](https://docs.avonnicomponents.com/flow/flow-components/data-table) and the [**Open Flow Dialog**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/open-flow-dialog) interaction, you can select multiple records and send their IDs as input variables to another flow

## Guided Steps

{% stepper %}
{% step %}

### Add an Action to the Data Table

Actions let you trigger interactions directly from the Data Table. You can add them in several ways:

* **Header action** – button in the header bar.
* **Row action** – button tied to each record.
* **Button/Button Icon column** – custom clickable elements.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FPoOiGItXA49QbDxhZ1Kg%2F2023-07-05_21-49-08.png?alt=media&#x26;token=9e0532e0-729b-4451-bc6d-a76ba55b5b67" alt=""><figcaption></figcaption></figure>

After adding one, your Data Table will include a new action button
{% endstep %}

{% step %}

### Configure the Interaction for the Action Button

Now let’s make the button actually do something.

1. **Open the Interaction Tab**
   * In the Component Builder, go to the **Interaction** tab of your Data Table.
2. **Add a Header Action**
   * Click **Add Header Action** to create a new interaction.
3. **Link to Your Action**
   * In the **Target Name** field, select the action button you created earlier.
4. **Choose the Interaction Type**
   * In the **Type** field, select **Open Flow Dialog**.
   * This ensures that pressing the button will open a flow dialog.
5. **Select the Flow**
   * In the **Flow API Name** field, choose the flow you want to trigger.
6. **Pass Input Variables**
   * In the **Input Variable** section, click **Add Item**.
   * **Name**: Enter a unique name for your input variable.
   * **Value**: Select **Selected Record Ids** to pass the IDs from the Data Table.
   * **Type**: Choose **Text**.
   * **Allow multiple values**: Enable this option to pass multiple record IDs at once.
7. **Save**
   * Click **Done** to save your interaction

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FWlkfoqzP9voOhDzEK0Qp%2F2023-07-05_21-58-58.png?alt=media&#x26;token=368030e9-e693-4989-875d-ad1bd5369f9b" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
You should ensure the flow you're triggering is designed to accept and correctly process the passed record IDs by creating a text variable with the same input variable name.
{% endhint %}
