Using Dependent Picklists in Screen Flows

Using Dependent Picklists in Screen Flows

With Winter ’20, Salesforce introduced a standard dependent picklist component for use in a screen flow. Now, depending on what the user selects from a picklist (controlling), we can show picklist items dependent on that first selection in a screen flow.

Business Use Case: 

Business Use Case: Louise  DeJesus is the system administrator at Universal Containers.  

Louise received a requirement to show a dependent picklist in a screen flow, just like on the Contact record.

When a user selects a value from the Status picklist, the Open for Offers field is populated with only the picklist items for a given status.

Solution

Louise recalled reading about the Dependent Picklist feature in Flow Builder in the Winter ’20 Release Notes and is excited for the opportunity to give it a whirl.

Steps:

  1. Create a custom picklist field ‘status’
  2. Create a custom picklist field ‘Open for Login’ and set status as it’s controlling picklist

To Create a flow please follow the below steps:

  1. Let’s create the flow. In setup for classic  go to ‘Create | Workflows & Approvals | Flows’.

In Lightning Experience, it is found under Process Automation | Flows.

A. Draw the Screen flow element to the canvas.

B. Drag the Dependent Picklist standard component to the screen area and configure it accordingly.

API Name: DependentPicklist

Object API Name: Contact

Picklist 1 API Name: Status__c (This is the controlling picklist’s API name)

Picklist 2 API Name: Open_for_Login__c (This is the dependent picklist’s API name)

Note: When we need to reference the dependent picklist selection by the users in our flow, we will find it here…

Let’s say we are creating a new record and setting the ‘status__c’ and ‘Open_for_Login__c’  fields using the values selected by the user.

We would want to pay close attention here since the name of the reference fields is not what we would expect. 

We would be looking for something called “Picklist 1 Value” or “Picklist 2 Value,” not “topValue” and “middleValue,” respectively.

  • Status__c: {!DependentPicklist.topValue} [Note: topValue is the picklist 1 value]
  • Open_for_Login__c : {!DependentPicklist.middleValue} [Note: middleValue is the picklist 2 value.]

 

That’s how to configure the dependent picklist on a screen flow and how you reference the picklist user selections.