How to Use the datatableFSC Flow Screen Component

The Datatable Flow Screen Component is derived from the datatable lightning base component.

The datatable is populated by passing in an SObjectCollectionVariable. Any selected rows may be passed back to the flow in another SObjectCollectionVariable.


NOTE: The FlowScreens interface does not yet support dynamic object types, so it’s necessary to define, in the cmp and design files, the object type that you’re going to be passing in. The component is pre-configured to support the Account, Asset, Case, Contact, Contract, and Opportunity objects. Up to 8 unique standard and custom objects are supported and you can edit the source files if you need to support different objects. If you are using custom objects, be sure to uncomment the appropriate lines in the controller file.

datatableFSC.cmp file (Lines 26-50)

datatableFSC.design file (Lines 3-27)

datatableFSCController.js file (Lines 81-90 and 126-131)


Input Parameters

API Name – Unique name for the component in the flow

Records to display in the Table (SObjectCollectionVariable)
Put the variable name in only 1 of the available object collection parameters
– Collection – Accounts
– Collection – Assets
– Collection – Cases
– Collection – Contacts
– Collection – Contracts
– Collection – Opportunities

Column01_align – [left, center, right] (only required if you want to override the default alignment for the field type)
Column01_fieldName – API Name of the field to display in the column
Column01_iconName – The Lightning Design System name of the icon – (optional, only available for the first column) [Example: standard:case]
Column01_label – The text to be displayed in the column header
Column01_type – This needs to match the field type to display properly [boolean, currency, date, date-local, email, location, number, percent, phone, text, url]
Column01_width – You can preset the width of the column from 50 to 1000 px – (optional)

Column02 through Column10 – Additional columns are optional, but if they are specified, _fieldName, _label & _type are required.

Output Selected <objectname> – Reference an SObject collection variable to pre-select table records

Show or Hide Checkbox Columnshow(default) or hide
Single or Multi-Row Selection – Set to 1 for Single Row selection (Radio Buttons), set to any other number to limit the number of selections, leave blank for full multi-select

Output Parameters

Records selected in the Table (SObjectCollectionVariable)
Specify a collection variable in your flow to store the selected records from the table. (optional)
Enter your variable in the parameter for the same object you used to pass records into the component.
– Output Selected Accounts
– Output Selected Assets
– Output Selected Cases
– Output Selected Contacts
– Output Selected Contracts
– Output Selected Opportunities

More details on how to use this component are covered here:

Enhance your Flows with Data Tables – Part 1

Enhance your Flows with Data Tables – Part 2

Enhance your Flows with Data Tables – Part 3