The Datatable_FlowScreenComponent is derived from the datatable lightning base component .
The datatable is populated by passing in an SObjectCollectionVariable.
NOTE: This is currently NOT a fully declarative screen component (meaning that you can't use it without modifying code)The FlowScreens interface does not yet support dynamic object types, so it's necessary to define, in the cmp file, the type that you're going to be passing in. In the example below, the attribute myData is set to the exact custom object type that will be passed.
(The goal we're working towards is where the Datatable will be able to receive any object from Flow and not care what it is until runtime.)
The selected rows are made available to the Flow via the selectedRows attribute, which is also a collection of a specific Salesforce SObject.
Install this Component Into Your Org
Currently Flow gives you the opportunity to define up to 5 columns. For each column that you want to use, specify the label you want to see, the API name of the field you want to see, and the type that Datatable should interpret the data as.
The basic mechanism for using a datatable is:
- Determine the object you're going to list in the table
- Edit your component to set the type of myData and selectedRows to be collections of that object:
Most of the functionality of this underlying base component has not yet been exposed to Flow. We welcome assistance expanding the range of utility of Flow Components.
Want to suggest an improvement or report a bug? Do that here