Enhance your Flows with Data Tables – Part 3

Lightning Flow Screen Components are a great way to add power to and improve the look of your Flows.  In this three-part series, I’ll show you how a single component, designed to display a list or table, can enhance your Flows.

Alex Edelstein’s unofficialsf.com website includes datatableFSC as one of many Flow Screen Components you can use for your own organization.

This component is derived from the datatable Lightning Base Component.  I recently enhanced Alex’s component to be more powerful and Admin friendly.

I will be showing you some examples about how the Datatable component:

  • Can be used in place of a Record Choice Set (Dynamic Record Choice) for selecting a record while displaying more than a single field
  • Can be used to select multiple records from an object then perform additional actions on them
  • Can be used to present your data in an interactive and visually enhanced format

Part 3: Displaying Tables in a Flow

How often have you had to use special formula fields or resort to building text output one line at a time in your flows to present a list of records?

In this post I’ll show you how to use the Lightning Datatable Flow Screen Component to turn this:

Into this:

I have an application where I wanted to use a Flow to display data from three separate objects on a single screen. In the original version of this Flow I created a text variable for each table and used a text template variable to insert each line into the table. Formatting was a challenge and alignment was impossible with this method.

Each table is created with a separate text variable.

The tables are built by appending a text template to the variable for each record.

The Text Template variable is used to append each of the tables fields together.

The final result includes all of the information, but it is not very easy to read.

In the new version of this Flow, I use 3 different Lightning Flow Screen Components (datatableFSC, horizontalRuleFSC, & navigationButtonFSC) from the unofficial.com website.

Other than a few Display Text sections, this screen is composed entirely of Lightning Flow Screen Components.

The horizontalRuleFSC components are used to add color and separation between my datatableFSC components and the navigationButtonFSC presents three custom buttons on the bottom of the screen.  The selected button determines what part of the Flow executes next.

The datatables are configured by providing the parameter values for the input and output sObject Collection Variables and each column is configured with parameters for field name, label and type along with optional parameters for alignment and width.

The final result gives me a Flow that I can use to view and interact with my tables.  I can sort any column in any table, I’ve added logic that allows me to select, then hide rows in any of the tables and I can select special processing to adjust the type of hierarchy used and then re-display the tables.

Here’s the Flow in action.


See the complete series on how you can use the datatable Flow Screen Component in your Lightning Flows.

Part 1 – Use a Datatable to present a dynamic choice for record selection in a Flow.

Part 2 – Use a Datatable in a Flow to select and act on a collection of records.

Part 3 – Use a Datatable to display a formatted, interactive table in your Flow.


8 thoughts on “Enhance your Flows with Data Tables – Part 3

  1. Can this be used to display information that is not coming from a Salesforce object? What I want to do is display a list of addresses to choose from, but they are coming from different objects (from Account, Contact, and Case, as well as a custom object). I just want one list of addresses.


    1. This is a great component that has helped me perform actions way better than by using record choice sets, not to mention its great look and feel.

      Would there be an easy way to implement a search bar on top of the table? I’m considering it for cases where the amount of records will be much bigger than what one would normally consider user friendly.


      1. That sounds like a great future enhancement for this component. In the meantime, you could implement this in the flow by inputting a search value and doing a new Record Lookup to then pass a subset of records to the datatable component.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s