You are here:
Data Table Screen Input Component
Display a collection of records in a table so that the user running the flow can select records. The flow stores the selected records as flow variables that the rest of the flow can act on.
Required Editions
Configure the Name and Label
| Field | Description |
|---|---|
| API Name | The API name of the component. An API name can include underscores and alphanumeric characters without spaces. It must begin with a letter and can’t end with an underscore. It also can’t have two consecutive underscores. |
| Use Label as the table title | Indicates whether to show the label value preceding the table when you run the flow. |
| Label | The text for the table title. The title appears above the table only when you select Use Label as the table title. |
Configure the Data Table Source
| Field | Description |
|---|---|
| Source Collection | For API version 65 and later, a collection of records or a collection of Apex-defined data types to populate the table. For API version 64 and earlier, a collection of records that are used to populate the table. Collection properties in an Apex-defined data type can’t appear as columns. If you use the Get Records flow element to retrieve the records to show in the table, select Choose fields and let Salesforce do the rest for the best performance. |
| Show search bar | Enables users to search and filter their record results. |
Configure Row Selection
| Field | Description |
|---|---|
| Row Selection Mode | Indicates how many rows the user can select in the table. You can set the value to:
If you set the mode to single and make it required, or if you set the minimum and maximum row selection to 1, Salesforce uses a radio button at run time. Otherwise, Salesforce uses checkboxes at run time. |
| Minimum Row Selection | Specifies the minimum number of rows that the user must select. |
| Maximum Row Selection | Specifies the maximum number of rows that the user can select. |
| Default Selection | A collection that specifies which records to preselect in the table. The component matches each record in the collection to a table row by its Unique Identifier value. Records that don’t match a row in the table are ignored. If the collection has more records than the Maximum Row Selection value, only the first records, up to the maximum, are selected. For example, you want to preselect an account’s primary contacts when the screen appears. Use a Get Records element to retrieve all of the account’s contacts, and a second Get Records element to retrieve only the primary contacts. Set the first collection as the Source Collection and the second collection as the Default Selection. The primary contacts are selected when the screen appears, and the user can change the selection. |
| Unique Identifier | Required. The field used to identify each record. The field requires a unique value for each record, such as an ID or API name. To make sure your Data Table component works as expected, provide a unique identifier. If you select a field that can have duplicate values, selection behavior can be incorrect and unpredictable, such as selecting multiple unintended rows. |
Configure the Data Table Columns
To add the first column to the table, configure these fields. To add subsequent columns, click Add column. Drag the columns to reorder them.
| Field | Description |
|---|---|
| Source Field | The field from the Source Collection object to show in the column. Fields with the anyType data type, such as the NewValue field of the AccountHistory object, are unsupported. If you use a field that has a namespace, add the namespace to the beginning of the source field. For example, if your field’s namespace is Acme, enter Acme__FieldName__c. |
| Display Options | Available only when the Source Field is a lookup field.
At run time, the column shows:
|
| Custom column label | Indicates whether to display the column label value you specify as the column header. |
| Label | If you select Custom column label, enter the text to show as the column header. Screen readers also read this text. If you don’t select Custom column label, the column header uses the translated label of the source field. |
| Default Text Overflow Mode | Specifies how text that is longer than the width of the column appears. You can set the value to:
|
| Let Users Modify Data Table | Allows users to modify fields in the Data Table at run time.
|
Set the Component Visibility
Specify the logic that determines when the flow displays the component.
| Option | Description |
|---|---|
| When to Display Component | Configure when the component is displayed by using conditional logic. You can set the components to:
|
Store the Data Table Component’s Values in the Flow
The flow stores values automatically. If you store values manually, store the attribute’s output value in a variable.
To use the values later in the flow, select them from the resource picker under the component’s API name.
To store values manually, select Manually assign variables (advanced).
You can store all attributes in flow variables. These are the attributes you’re most likely to use.
| Field | Description |
|---|---|
| First Selected Row | The first record that the flow user selects, counting from the top of the table. If a user selects multiple records, this is the topmost one. |
| Selected Rows | The list of records that the user selects. The records appear in order of their position in the table from top to bottom. To check whether the user selected anything, use a Decision element to test whether Selected Rows is empty. If Minimum Row Selection is 1 or more, users can’t continue without selecting a row. |
| Edited Rows | A list of records that the user edits. Available in API version 66.0 and later. |
- Navigates to another screen and returns to the component’s screen.
- Pauses the flow then resumes it.
- Navigates to the next screen and triggers an input validation error.
Setting the attribute enables a flow to remember the value. The flow stores the value automatically. If you store values manually, store the attribute’s output value in a variable.
Validate Input
Provide a formula that evaluates whether what the user entered is valid and the error message to display if invalid.
| Option | Description |
|---|---|
| Error Message | Specify the error message that appears below the component if the user enters an invalid value. |
| Formula | Provide a formula expression that returns a Boolean value. If the formula expression evaluates to true, the input is valid. If the formula expression evaluates to false, the error message appears below the component. If the user leaves the field blank and the field isn’t required, the flow doesn’t perform the validation. If the user leaves the field blank and the field is required, the flow shows the default error message and not your custom error message. |
Specify the Behavior of Values on Revisited Screens
Specify what this component does when a user enters a value, navigates to a previous screen, and then returns to the screen with this component.
Display and Layout Considerations
- The Data Table flow screen component isn’t compatible with mobile devices.
- If you choose to wrap the text in a Data Table, make sure that the text doesn’t overflow when you test your flow. Wrapped text can overflow when a Data Table is compressed on a screen, for example, when it’s in one of multiple columns.
- The Data Table component displays dates and times in International Components for Unicode (ICU) formats.
- The Data Table component doesn’t translate picklist field values. Picklist values appear in the language in which they’re stored, regardless of the user’s language.
- Column headers use the translated label of the source field. If you select Custom column label, the header is plain text and isn’t translated. To display multilingual custom column header labels in the Data Table component, use the
$Labelglobal variable to specify custom labels. For more information about creating and translating custom labels, see Custom Labels. - If you have a flow open that has a Data Table component, and you update your user settings time zone on another page, refresh the flow page to show the updated date and time fields in the Data Table component.
Search, Sort, and Selection Considerations
- If you apply a filter after loading your initial records, the table shows only the new results and no longer includes the initial records.
- You can’t search the Time field.
- With column sorting, sorting doesn’t impact the first selected row and the selected rows.
- If you use the row selection of another Data Table component, note that Salesforce doesn’t support row selections that have duplicate record variables without record IDs.
Data and Formula Field Considerations
- If a Data Table includes a formula field and records or updates to records that haven’t been
committed to the database, the table doesn’t evaluate the formula properly.
For records that don’t exist in the database, update the value of the formula field with an assignment using a static value or Formula resource. Doing so doesn’t affect any subsequent Create or Update operations in the flow.
For existing records that have been updated, use an invocable action to reevaluate the formula, or use the IN operator to refresh the records and formula field values.
- The Subject field on Task and Event records isn’t supported.
- In multi-currency orgs, the Data Table component doesn’t support records that are in a different currency from the user’s personal currency.
- Data Table selections at run time are subject to the client payload data limit described in Lightning Aura Components Developer Guide. If you exceed this limit, the flow returns a generic error message. For example, if you include file data that exceeds the limit, the flow generates an error. We recommend avoiding fields like the VersionData field of ContentVersion records in your source collection.
Data Table Limits
- The maximum height of a Data Table is 400 pixels.
- A Data Table can show up to 1,500 records. However, your search is performed on the entire dataset.
- You can select up to 200 records in a Data Table.
Packaging Considerations
- If you package a flow that has a Data Table component, the fields used in the Data Table aren’t automatically added to the package. If you use a field in the Data Table component, you must manually add it to the package.
Behavior by API Version
- Starting in API version 65.0, field name changes are automatically updated in Data Table components. For flows running in API versions before 65.0, if you rename a field in Object Manager that’s mapped to a column in a Data Table, Salesforce doesn’t update the column name. To see the new name in the Data Table, remove the column and then add it again.
- Starting in API version 65.0, you can no longer delete a field referenced in a Data Table component. For flows running in an API version before 65.0, you can delete a custom field that a Data Table component uses, but you must also remove the field from the Data Table component.
- Starting in API version 65.0, namespaces are automatically updated in Data Table components. For flows running in an API version before 65.0, you must add the namespace to the associated column fields in the Data Table manually. This namespace requirement applies when a Data Table component uses a custom object or custom field in an org without a namespace, and you later add a namespace to the org.
