Salesforce Flow is one of the most powerful tools available for automating business processes without writing code. Among different types of flows, Screen Flow is widely used because it allows users to interact with data through a user-friendly interface.
Many organizations use Screen Flow to simplify complex processes such as updating records, collecting user input, and dynamically displaying data.
One of the most useful features inside Screen Flow is the Data Table component. This component allows you to display multiple records in a structured table format, similar to a list view, but with more flexibility and control.
Instead of navigating to different pages or list views, users can see and interact with records directly on the flow screen. This significantly improves productivity and the user experience.
While working as a Salesforce admin, I needed to update the phone field of selected related contacts’ records on the account object. I was trying to update it from the list view, but we cannot display a filter that shows only related records.
To achieve this, I created a screen flow that added a data table to display all related contact records for the account and deployed it on the account record page.
From the account record page, we can select multiple related contacts and update the fields.
In this tutorial, we will learn how to use Salesforce Data Table in Screen Flow. In this, I will explain how to add the data table component to the screen element and provide a data source for the table.
What is a Data Table in Salesforce Screen Flow?
When we want to display records in a clear, table format inside a Salesforce Flow, we can use the data table component in Screen Flow. Using the data table, we can select multiple records and process them in bulk.
For example, if you want to update phone numbers for multiple related contacts:
- We will use a data table to display all contacts related to an account.
- The user will then select which contacts to update.
- Update those selected contacts in one click.
Salesforce has continuously improved this component, making it more powerful and flexible for admins and developers.
Today, it is considered one of the most important components in Screen Flow when dealing with multiple records.
Key Features of the Data Table in Salesforce
The Data Table component comes with several useful features that make it powerful:
- Display multiple records in a table format
- Select single or multiple rows
- Configure columns dynamically
- Control the minimum and maximum selection
- Pass selected records to the next steps in the flow
- Integrate with record collections
These features enable you to design user-friendly, efficient flows for real business scenarios.
Why Use a Data Table in Screen Flow?
Using a Data Table in Screen Flow provides multiple advantages. First, it improves the user experience by displaying records in a clean, structured format. Instead of navigating through multiple pages, users can see everything in one place.
Second, it enables bulk operations. Users can select multiple records and perform actions such as update or delete, or process them together. This saves time and reduces manual effort.
Third, it provides flexibility. You can control which fields to display, how many records to show, and how users can interact with them. This makes it more powerful than standard list views.
Finally, it integrates seamlessly with other Flow elements, such as Get Records, Loop, Assignment, and Update Records, allowing you to build complete automation solutions.
How the Data Table Works in Screen Flow
To use a Data Table, you first need to retrieve records using the Get Records element. These records are stored in a collection variable. Then, you pass this collection to the Data Table component as the source.
Inside the Data Table configuration, you can choose which fields (columns) to display. You can also control how users interact with the table, such as selecting one record or multiple records.
Once the user selects records, they can be used in subsequent steps of the flow, such as updating records or performing other actions.
Use Salesforce Data Table in Screen Flow
Below, I will explain how to use the data table in screen flow to display all contacts related to an account, allowing us to quickly select and update them using the example and step-by-step explanation above.
To create the flow, navigate to Setup -> in Quick Find search for Flow -> New Flow -> Start From Scratch -> Screen Flow -> Next.
Next, create the Variable resource named recordId.
As you click the Resource Type dropdown field, you will see various resources, such as Variable and Text Template. Here, we need to select the Variable.
- API Name: Ensure that the variable name must be exactly recordId to assign the record ID from the object.
- Data Type: The record ID is always a text string, so set the data type to Text.
- Availability Outside the Flow: We must check the Available for input option. That means we will pass the input ID from the Lightning record page or Apex to the flow.
Then click the Done button.

Next, we need to retrieve the contact records stored in the Contact object. For that, we need to add the Get Records element and enter a Label and API Name.
Then, to filter the contact records, add a condition. Here, I set the following two conditions to filter the records.
- Account ID equal to ‘recordId’ (created variable).

Now, add the screen element where we will add the data table component. To do this, click on the Component tab and search for the Data Table.
After that, provide the API Name. Then, to display the contact’s details in the data table, we need to select the “Get Record” (record collection) option from the Source Collection.

Then click the Configure Columns dropdown to add or remove the column (contact fields) you want to display in the data table.

As you add the column to the top of the data table on the screen canvas, you will see it appear.

After that, in the Configure Rows option, you need to select the row selection mode, where you can choose how many rows you want to select, and you can specify this in the Minimum Selection and Maximum Selection.

After that, we need to create a new variable resource to store the updated records. This time, we need to select ‘Data Type’ as ‘Record’ and enable ‘Allow multiple values collection’ so that we can assign values first and then update them simultaneously.
When we elect the record data type, we also need to select Object, so here we want to update the contact records.

Next, add a Screen element to collect user input to update the contact record’s phone field.
In this case, we are providing a text field for the user to enter their phone number. To do that, click the Component tab, and add fields for which you want to fill values.

Now, we will use a loop to iterate over the selected records that the user chose to update. To add the Loop Element, click on the Add Element icon.

We need to update the record to see the changes in the contact object. To do this, add the Update Record element and provide a Label and API Name.
Next, select ‘Use the IDs and all field values from a record or collection.‘ So we can add the collection variable that stores all the updated contact records.

Now we are ready to save the flow. For that, click the Save button, provide the flow Label, and the API Name will be automatically populated.
After that, always debug the flow before activating it to ensure that the working flow is correct and that there are no runtime errors. Then activate the flow.


After that, navigate to the Account object record from where you want to relate contacts.
Click the Gear icon -> Edit Page.

After that, in the Component tab, search for the Flows. Drag and drop it onto the record page where you want it.
After that, on the right side, you will see the Flow option; there, select the screen flow that you created. Also, you need to check the checkbox to pass the record ID into this variable.
That means whenever we open an account record, the record ID is passed to the flow, which displays the related contacts in the data table for that ID.
After that, save the page.

Proof of Concept:
Now, navigate to the account object record, and this time you will see the data table you added in the screen component, which displays the related contacts.
Here, select the contact record’s phone field you want to update, then click the Next button.

After that, the second screen will appear, where we need to enter the contact’s mobile number. Click the Next button again.

Now you can see the mobile number you provided on the previous screen, which has been updated in the contacts you selected.

In this way, we can use the data table in the Salesforce screen flow.
Data Table vs List View in Salesforce
| Feature | Data Table | List View |
|---|---|---|
| Custom UI | Yes | No |
| Bulk selection | Yes | Limited |
| Flow integration | Yes | No |
| Custom logic | Yes | No |
Conclusion
The Data Table component in Salesforce Screen Flow is a powerful feature that helps users interact with multiple records efficiently. It improves user experience, reduces manual work, and enables bulk operations within flows.
By using this component correctly, you can build advanced automation solutions without writing code.
If you follow best practices and add real-world use cases, your flows will become more effective and user-friendly. Mastering the Data Table in Screen Flow is an important step in becoming a skilled Salesforce Admin or Developer.
You may like to read:
- Clone Salesforce Flows
- Use In and Not In Operators in Salesforce Flow
- Send An Email with Dynamic Attachments in Salesforce Flow
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.