> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/creating-row-actions.md).

# Creating Row Actions

Add a row menu, buttons and links to a screen flow Data Table, then open another flow, a record or the next screen with the row the user clicked.

A sales manager reviews the open opportunities of her team on a flow screen. On each row she wants a small menu: **Change Owner** opens a second flow on that deal, **Close as Lost** sends the flow to the next screen with the deal she picked. When one action matters on every row, it gets its own button instead, like a **Reassign** button at the end of each line. Both kinds fire the same **Row Action** interaction.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fa2CFE2yFmeMjjihvXpLU%2Fdata-table-tutorial-creating-row-actions-result.png?alt=media" alt="Data Table of opportunities with the row action menu open on one row, showing Change Owner and Close as Lost"><figcaption><p>Each row gets a menu of actions, here Change Owner and Close as Lost.</p></figcaption></figure>

## Before you start

* A screen flow with the Avonni [Data Table](https://docs.avonnicomponents.com/flow/flow-components/data-table.md) on a screen, showing Opportunities. [Learn the Basics](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/learn-the-basics.md) covers that setup.
* If an action opens another flow, that flow exists and is active, with a Text input variable for the record Id (for example `recordId`, **Available for input** checked).
* To refresh the table after that flow ends, the Data Table uses the **Query** data source.

## Add a row menu

{% stepper %}
{% step %}

### Add an Action column

1. Select the Data Table on the screen and click **Open Component Builder**.
2. In the **Properties** tab, under **Data Mappings** > **Columns**, add a column and choose **Custom** instead of **Object Field**.
3. Name it `Actions` and set **Type** to **Action**.

The Action column has no field behind it: it only holds the menu. It is narrow, so keep its label short or hide it.
{% endstep %}

{% step %}

### Declare the actions of the menu

In the column's **Type Attributes**, under **Row Actions**, add one entry per menu item:

* **Label**: what the user reads, for example `Change Owner`.
* **Name**: the identifier the interactions and the flow use. It fills in from the Label; change it to something short without spaces, for example `change_owner`.
* **Disabled** and **Hidden** are optional per entry, and can read a checkbox field of the row instead of a fixed value.

Add a second entry, `Close as Lost` with the name `close_lost`. **Menu Alignment** sets where the menu opens (**Auto** by default).

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Ff3EpuLD9aLEtQ1jClTd0%2Fdata-table-tutorial-creating-row-actions-type-attributes.png?alt=media" alt="Type Attributes of the Actions column with Type set to Action and two row actions listed" width="320"><figcaption><p>Type Attributes of the Actions column: the type and the items of the menu.</p></figcaption></figure>
{% endstep %}

{% step %}

### Open another flow from an action

1. Go to the **Interactions** tab and add a **Row Action** interaction.
2. In **Target Name**, pick `Change Owner`. The list shows every row action, button and button icon of the table.
3. Set **Type** to **Open Flow Dialog** and pick the flow in **API Name**. The list shows flow labels, not API names.
4. Under **Input Variables**, add an item: **Name** lists the input variables of that flow, pick `recordId`. In **Value**, pick the row's Id field, for example **Record: Id**. Set **Type** to **Text**.
5. Under **On Finish**, add **Refresh Query** so the row shows the new owner when the dialog closes.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FKM5PYd67J9F7tcMd0oes%2Fdata-table-tutorial-creating-row-actions-interaction.png?alt=media" alt="Row Action interaction opening a flow dialog with the clicked opportunity Id and a Refresh Query on finish" width="320"><figcaption><p>The Change Owner action opens a second flow on the clicked opportunity, then refreshes the table.</p></figcaption></figure>

{% hint style="info" %}
**Value** offers the fields of the row the user clicked (the **Record: ...** entries). Do not map **First Selected Row** here: it follows the checkboxes, not the row whose menu was opened.
{% endhint %}
{% endstep %}

{% step %}

### Or hand the clicked row to the rest of the flow

Some changes belong in the flow itself, with your own checks. For `Close as Lost`:

1. Add a second **Row Action** interaction, **Target Name** `Close as Lost`, **Type** **Flow Navigation**, then **Next Screen**.
2. After the screen, add a **Decision** that checks the Data Table output **Clicked Row Action Name** equals `close_lost`.
3. On that path, an **Update Records** element filters on **Id** equals **Clicked Row Action Key Field Value** and sets **Stage** to `Closed Lost`. **Clicked Row Action Row** gives the whole record when you need more fields.
4. Connect the path back to the screen (or to the Get Records with a **Variable** source) so the manager lands on a fresh table.

The same outputs are filled for every row action, so one Decision can route several actions.
{% endstep %}

{% step %}

### Save and test

Click **Done**, save the flow and run it with **Debug**. Each row shows a menu button at the end. **Change Owner** opens the second flow in a dialog on that opportunity, and the row updates when the dialog finishes. **Close as Lost** moves to the next screen, and the Decision takes the `close_lost` path.
{% endstep %}
{% endstepper %}

## Add a button or a link in a column

A menu hides its actions behind a click. When one action is the obvious next step, show it on the row.

| You want                                                | Column type                                 | Fires an interaction         |
| ------------------------------------------------------- | ------------------------------------------- | ---------------------------- |
| A labeled button on each row (`Reassign`, `Log a Call`) | **Button**                                  | Yes, through **Row Action**  |
| A compact icon on each row (a pencil, a phone)          | **Button Icon**                             | Yes, through **Row Action**  |
| A button that reads like a link                         | **Button** with **Variant** set to **Base** | Yes, through **Row Action**  |
| A plain link to a web page or to a record               | **Url**                                     | No, the link opens by itself |

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F1L0YPJ2QNlhl53voTjIW%2Fdata-table-tutorial-creating-row-actions-buttons.png?alt=media" alt="Data Table where each opportunity name looks like a link and each row has a blue Reassign button"><figcaption><p>A Base button that reads like a link, and a Brand Reassign button on every row.</p></figcaption></figure>

{% stepper %}
{% step %}

### Add the button column

1. In **Data Mappings** > **Columns**, add a **Custom** column, for example `Reassign`, and set **Type** to **Button** (or **Button Icon**).
2. In **Type Attributes**, fill **Label** (`Reassign`). The Label can also be a field of the row: pick the opportunity name and set **Variant** to **Base**, and each name reads like a link.
3. Fill **Name** (`reassign`). Unlike a menu entry, a button's Name does not fill in by itself, and without it the button never shows up in **Target Name**.
4. Optional: **Variant** **Brand** for a filled blue button, and an **Icon Name**.
   {% endstep %}

{% step %}

### Wire it

In the **Interactions** tab, add a **Row Action** interaction and pick the button in **Target Name**, where it is listed by its label. Then choose the **Type**, exactly as for a menu entry: **Open Flow Dialog** with `recordId` mapped to **Record: Id**, **Flow Navigation** to the next screen, or **Navigate** to open a page.
{% endstep %}

{% step %}

### Or use a plain link

When the click only needs to open a page, skip the interaction. Use a column whose field holds a web address or a record Id (the opportunity Id, or a lookup such as the account):

* Set **Type** to **Url**.
* For a record Id, turn on **Record Link**: the Id becomes a link to that record.
* **Label** sets the text shown instead of the raw value, **Target** where the page opens, **Tooltip** the hover text.

To link the record name itself, use **Linkify** on the name column instead ([Displaying record name field as a link](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/displaying-record-name-field-as-a-link.md)).
{% endstep %}
{% endstepper %}

## What a row action can do

| Type                                                                                                                                                                                                                                                                                    | What happens on the clicked row                                                                  | Data source       |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ----------------- |
| [**Open Flow Dialog**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/open-flow-dialog.md) / [**Open Flow Panel**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/open-flow-panel.md)                                         | Runs another screen flow in a modal or a side panel, with the row's values as input variables    | Any               |
| [**Navigate**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/navigate.md)                                                                                                                                                                                 | Opens a record page, a list or a URL. This leaves the flow unless the page opens in a new window | Any               |
| [**Edit Selected Record(s)**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/edit-selected-records.md)                                                                                                                                                     | Opens an edit dialog for the clicked row; with a Query source the table reloads after the save   | Query or Variable |
| [**Delete Selected Record(s)**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/delete-selected-records.md) / [**Duplicate Selected Record(s)**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/duplicate-selected-records.md) | Deletes or copies the clicked record                                                             | Query or Variable |
| [**Refresh Query**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/refresh-query.md)                                                                                                                                                                       | Reloads the table's own query                                                                    | Query             |
| [**Flow Navigation**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/flow-navigation.md)                                                                                                                                                                   | Moves the flow to the next screen, back, pause or finish                                         | Any               |

You can stack several interactions on the same **Target Name**. They run in the order you list them.

## Troubleshooting

<details>

<summary>The action or the button is missing from Target Name</summary>

**Target Name** lists menu entries, **Button** columns and **Button Icon** columns that have a **Name**. A button's Name stays empty until you fill it. A **Checkbox Button** column is never a target.

</details>

<details>

<summary>The second flow opens but receives no record</summary>

Check three things: the input variable of the target flow is marked **Available for input**, its data type matches the **Type** you set in the interaction (**Text** for an Id), and **Value** is a **Record: ...** entry, not a selection output.

</details>

<details>

<summary>Edit, Delete or Refresh Query is not in the list of types</summary>

The record operations need a **Query** or **Variable** data source, and **Refresh Query** needs **Query**. With a **Variable** source, loop the flow back through its Get Records to show new values ([Enabling auto-refresh](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/tips-and-tricks/enabling-auto-refresh-on-the-data-table-when-pressing-a-button.md)).

</details>

<details>

<summary>The user lands on a record page and the flow is gone</summary>

**Navigate** leaves the flow. Open the record work in a dialog with **Open Flow Dialog**, use **Flow Navigation**, or open the page in a new window.

</details>

## Related tutorials

* [Enabling auto-refresh on the Data Table when pressing a button](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/tips-and-tricks/enabling-auto-refresh-on-the-data-table-when-pressing-a-button.md): keep the table current after an action.
* [Passing multiple record IDs to another flow](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/tips-and-tricks/passing-multiple-record-ids-to-another-flow.md): act on all the selected rows at once from the table header.
* [Column Types Gallery](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/column-types-gallery.md): every column type, buttons included.
* [How to create an interaction to open another flow](https://docs.avonnicomponents.com/flow/tutorials/interactions/how-to-create-an-interaction-to-open-another-flow.md): the Open Flow Dialog settings in detail.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/data-table/creating-row-actions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
