Pre Selecting Records
With the pro version of Flow Data Table, it is possible to display the data table with records already selected. In this guide, we will refer to this practice as "pre selecting records" since you will be selecting the records in a flow builder step prior to displaying the data table.
In this guide, we will extend the flow from the getting started guide to display the data table with one or more records already selected.
Build The Pre Selected Records List
Starting with the Flow you created in the getting started guide, perform the following steps in Flow Builder:
- Drag a Get Records element on to the canvas
Label: Get Selected Accounts
API Name: Get_Selected_Accounts - In the Get Records of This Object section in the Object field, type Account
- In Filter Account Records, we will enter a filter to only select some of the records based on some criteria. Fill out the section as follows:
Condition Requirements: Conditions are Met
Field: Name
Operator: Contains
Value: United (NOTE: this value can vary based on your orgs data. This guide assumes that you are using a developer org or scratch org with the default Salesforce sample data) - Scroll down and ensure the All records radio button is selected
- At the bottom of the window under "How to Store Record Data" select Choose fields and let Salesforce do the rest
- If your form looks like the below, click Done:
Finalize The Flow
- Delete the arrow that connects Get Accounts and Accounts Table by clicking the arrow with your mouse and then hitting the "delete" key on your keyboard. After deleting the arrow, your flow should look something like this:
- Now connect Get Accounts to Get Selected Accounts
- Then connect the Get Selected Accounts to Accounts Table
- Double click the Accounts Table screen element
- Click the Flow Data Table component
- Scroll to the Selected Records property and select Get_Selected_Accounts (Note that this name may vary depending on how flow builder generated your record collection variable)
- Ensure the Table Mode field is set to Select Records
- Click Done
At this point, your flow should look like the following:
Save and Run the flow. The flow should open in a new window and display the data table with some records pre selected.
Note: if your flow does not have any records pre selected, it may be due to your filter criteria in the Get Selected Accounts flow element. You can try editing the criteria to select one or more of the records in your list.