For the complete documentation index, see llms.txt. This page is also available as Markdown.

Enabling auto-refresh on the Data Table when pressing a button

Reload the rows of a screen flow Data Table from a Refresh button in its header, or on its own when a dialog flow finishes, without restarting the flow.

A sales manager keeps the open deals screen up during the forecast call while reps update their opportunities. The table read its rows when the screen opened, so it now shows yesterday's amounts. A Refresh button in the table header reads the rows again on demand. The same Refresh Query interaction also runs on its own when a dialog flow finishes, so a reassigned deal shows its new owner at once.

Data Table titled Open opportunities with a Refresh button in its header
A Refresh button reloads the table without restarting the flow.

Before you start

  • The Data Table uses the Query data source. Refresh Query reloads that query, so it is not offered with Manual or Variable. A table fed by a Get Records collection has its own method: see With a Get Records collection.

  • For the automatic refresh: a row action or button that opens another flow. Creating Row Actions sets one up.

Steps

1

Add a Refresh button to the header

  1. Select the Data Table on the screen and click Open Component Builder.

  2. In the Properties tab, open the Header group and give the table a Title, for example Open opportunities.

  3. Under Actions, add an item with Label Refresh, Name refresh and Icon Name utility:refresh.

The button appears at the top right of the table, on the title row.

2

Make it reload the query

  1. Go to the Interactions tab and add an interaction under Header Action.

  2. Set Target Name to Refresh.

  3. Set Type to Refresh Query. There is nothing else to fill in: it reloads this Data Table's own query.

3

Refresh automatically after a dialog

Open the interaction that runs the other flow (Open Flow Dialog or Open Flow Panel, on a row action, a button or a header action). It has three follow-up lists: On Finish, On Close and On Error.

  1. Under On Finish, add an item with Type Refresh Query. The table reloads as soon as the second flow reaches its end.

  2. Add the same item under On Close if users may close the dialog with the X after saving.

Row Action interaction opening a flow dialog with the clicked opportunity Id and a Refresh Query on finish
The Change Owner action opens a second flow on the clicked opportunity, then refreshes the table.
4

Save and test

Click Done, save the flow and run it with Debug. In another tab, change the amount of one opportunity, then click Refresh: the row shows the new amount, and the screen and its other components stay as they were. Open the dialog from a row, save, and the row updates when the dialog closes.

Refresh other components on the screen

Refresh Query only reloads the Data Table that fires it. To reload every Avonni component with a query on the page (a second table of closed deals, for example), use Refresh All Queries instead:

Setting
When on

Flow Scope

Only components in the current flow refresh. Off by default, so every flow on the page refreshes.

Exclude Self

The component that fires the interaction keeps its data.

With a Get Records collection

A table that reads a Get Records collection (Variable data source) shows the records the flow held when the screen opened. Only the flow can fetch them again, so send it back through the Get Records:

1

Leave the screen on the click

Add the Refresh header action as above, with a Flow Navigation interaction, Type Next Screen.

2

Loop back to Get Records

After the screen, add a Decision on the Data Table output Clicked Header Action Name. When it equals refresh, connect back to the Get Records element. It runs again and the screen reopens with fresh rows.

Troubleshooting

Refresh Query is not in the Type list

The Data Table uses a Manual or Variable data source. Switch it to Query, or use the loop described in With a Get Records collection.

A record disappeared after the refresh

Refresh Query runs the same query with its current filters. A deal moved to Closed Won no longer matches a table filtered on open deals, so it drops out, as expected.

The table does not update after the dialog

The Refresh Query item sits under On Finish, but the user closed the dialog with the X. Add the same item under On Close.

Last updated

Was this helpful?