Work with Selected Rows
Let a sales manager tick up to three deals in a screen flow Data Table, require a pick, then reassign every selected deal with one Loop and Update Records.
Every Monday a sales manager rebalances her team's pipeline: she moves at most three open deals to the rep with the most room. The Data Table lets her tick those deals, stops at three, and refuses to move on with none. On the next screen she picks the new owner, and the flow reassigns every ticked deal in one update.

Before you start
A screen with an Avonni Data Table on Opportunity, fed by a Query or a Variable (Get Records) data source. Learn the Basics sets one up.
The examples use the API Name
DealsTable. Replace it with yours in every reference.
Steps
Set the selection rules
Still in the Properties tab:
Max Row Selection:
3. Once three rows are ticked, the user clears one before ticking another. With1, picking a row replaces the previous pick.Required: on. If the user clicks Next with no row ticked, the screen stays open and shows "Please select minimum 1 row."
Rows Selection Disabled: the Key Field values (record Ids by default) of rows that cannot be ticked, such as deals locked by an approval. Type them, or map a text collection the flow built earlier.
Required only applies while the checkbox column is visible. If users also edit cells in this table, Max Row Edit and Selection (under Advanced Options) caps edited and selected rows together, and a row that is both counts once.

Keep the selection in sight
On a long table, ticked rows scroll out of view. Two settings keep them visible:
Show Number of Items Selected prints the count with a Clear selection link ("3 items selected").
In the Pill Container group, turn on Show Pill Container Selected Item and set Label Field to the opportunity name. Left empty, each pill shows the record Id. Sortable lets the user reorder the pills, Single Line keeps them on one row.
Removing a pill unticks its row, so the user does not have to scroll back to it.
Pre-select rows when the screen opens
Two ways, depending on the data source:
With a Variable source, set Default Selection Collection in the Fields tab to another record collection, for example the deals the flow already flagged.
With any source, set the Selected Rows Key Field Value input to the Key Field values (usually record Ids) of the rows to tick.
Pick the output you need
Every element after the screen can read the outputs of DealsTable. The three this flow needs:
Selected Rows (
{!DealsTable.selectedRows}): the ticked records, for a Loop or an Update Records.Number of Selected Rows (
{!DealsTable.nbSelectedRows}): for a Decision on how many rows were ticked.Selected Rows Key Field Value (
{!DealsTable.selectedRowsKeyValue}): the record Ids, for a subflow or an action that takes Ids.
The comma separated variant of the Ids wraps each one in single quotes, the shape a SOQL IN (...) clause expects, so an Apex action can take it as is. Every selection output, with its API name, is in the Data Table reference.
Reassign the selected deals
Add a Loop over
{!DealsTable.selectedRows}, namedLoop_Deals.Inside the loop, an Assignment:
{!Loop_Deals.OwnerId}Equals{!New_Owner.recordId}, then Add{!Loop_Deals}to a new Opportunity record collection,DealsToUpdate.After the loop (After Last Item), one Update Records on
DealsToUpdate.
Updating once after the loop keeps the flow to a single database update, however many deals were ticked.
To hand the deals to another flow instead, pass {!DealsTable.selectedRowsKeyValue} (Passing multiple record IDs to another flow).
Save and test
Run the flow with Debug. Tick three deals: the table shows "3 items selected", three pills appear, and a fourth row cannot be ticked. Clear them all and click Next: "Please select minimum 1 row." appears. Tick two, click Next, pick a user in New owner and finish. Both opportunities now show that user as owner.
Troubleshooting
Related tutorials
Passing multiple record IDs to another flow: act on the selection in a dialog, without leaving the screen.
How to Grayscale Header Actions Dynamically: keep header buttons disabled until a row is ticked.
Column Header Actions and Default Filters: act on the ticked deals from a column header menu.
Implementing a bulk edit on the Data Table: change one field on many selected rows at once.
Was this helpful?
