Enhance your Flows with Data Tables – Part 2

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 2: Acting on a Group of Records

In my company, we use Email to Case to generate Cases for our support team.  An issue that comes along with enabling this feature, is that we tend to get quite a few Cases created as the result of junk emails.  We don’t want just anybody to be able to delete a Case, so we have a process where any user can ‘flag’ a junk Case for deletion. A manager can then run a Flow that shows all of the flagged Cases and can make a final review before actually deleting the Cases.

I used the datatableFSC Flow Screen Component to present the list of flagged Cases and the Flow uses the collection of records selected by the manager to handle the deletions.

See https://unofficialsf.com/datatable for complete information and instructions on this component.

By not entering any values for the width or alignment parameters, I let the system use its defaults to handle the columns widths and alignments.

Only fieldName, label and type are Required
Default Table Format

The records presented in the table are stored in the {!colCase} variable by the Get Cases Selected (Fast Lookup) node.

The datatableFSC component uses that collection variable to build and display the records for the table.

By defining an Output Parameter, the records selected by the user are passed back to the flow in the {!colCaseDelete} variable.

That variable is then used in the Delete Cases (Fast Delete) node.

The datatableFSC component provided a great way to present a formatted view of a list of records, select one or more from that list, and then use the flow to act on the selected records.


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.



Advertisements

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

  1. Looks great, but why am I getting the The lightning:availableForFlowScreens interface doesn’t support these attribute types in the design resource: rednoses.asset[], rednoses.opportunity[], rednoses.account[], rednoses.case[], rednoses.contact[], rednoses.contract[]. error when installing?

    Like

  2. Hi,
    Thank you sharing. I’ve installed the package.
    I’m getting the following error:
    This page has an error. You might just need to refresh it
    . Action.prototype.finishAction Error [Action failed: c:datatableFSC$controller$init [Cannot read property ‘length’ of undefined] Callback failed: serviceComponent://ui.interaction.runtime.components.controllers.FlowRuntimeController/ACTION$runInterview] Failing descriptor: {flowruntime:flowRuntime}

    Any help is much appreciated.

    Thank you

    Like

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