Loading

How to conditionally show Screen Component Using Dependent Picklist in Salesforce Flow

Veröffentlichungsdatum: May 4, 2026
Beschreibung

In this article, we'll explore how to create a Screen Component in Salesforce Flow that behaves dynamically by showing a Text box only when a specific value is selected in a Dependent Picklist and hiding it for other selections. This helps improve user experience by displaying only the relevant fields.
For example, a customer intake form shows an 'Explain if Other' text box only when the user selects 'Other' from a category dropdown — improving form clarity and reducing data entry errors.

Lösung

Step 1: Create a new Screen Flow and add a Variable

  • Go to Setup
  • In the Quick Find box, type Flows and select Flows from the results
  • Click New Flow
  • Choose Screen Flow and click Create. The Flow Builder will open
  • Click on the Toggle Toolbox icon

Flow Builder canvas showing the Toggle Toolbox icon highlighted in the top-left corner

     

    • Click New Resource, and select Variable

     

    Flow Builder Toolbox showing the New Resource option selected and Variable type highlighted

     

    • Enter the following details
    API Name recordId
    Data TypeRecord
    Available for inputCheck this box

    Note: The name of the Variable must be exactly recordId without any quotation mark or spaces

     

    Step 2: Add a Screen Element and insert the Dependent Picklist Component

    • In the Flow Builder, click the + icon on the canvas
    • Select Screen from the list of elements
    • Give your Screen a clear Label
    • In the Screen Component panel on the left, find and drag the Dependent Picklist Component onto your Screen

     

    Screen Element editor showing the Dependent Picklist component being dragged from the left panel onto the Screen canvas

     

    • Then, use the Configuration Panel on the right to fill in the required details and click Done
    • For this example, the object API Name is Test_Object__c, the Controlling Picklist Field is Picklist__c and Dependent Picklist Field is Dependent _Picklist__c

    Note: Update these values to match the object and field API names based on the org setup

    Configuration Panel on the right showing API Name, Controlling Picklist Field, and Dependent Picklist Field values filled in  

    Step 3: Add a Text Component and set Conditional Visibility

    • On your Screen Element, drag a Text Component from the left panel and drop it onto the Screen
    • In the right-hand panel, enter a Label for the component
      • For this example, let's Label it Explain if Other
      • The API Name will auto populate based on the Label

    Screen Element right-hand panel showing the Text component labelled 'Explain if Other' with API Name auto-populated

    • Still in the right-hand panel, scroll down to the Set Component Visibility section and expand it
    • Under When to Display Component, choose All Conditions Are Met (AND)
    • Click Add Condition, and in the Resource field, select the Dependent Picklist Component added earlier
    • In Resource, select the Dependent Picklist value and configure as shown below
    Resource{!Dependency.middleValue}
    OperatorEquals
    ValueOther

     

    Step 4: Test and Save the Flow

    • Click Run on the Flow Builder canvas to test 
    • In the Screen, select Other from the Dependent Picklist
      • The Text field should appear

    Flow preview showing the 'Explain if Other' Text field appearing on screen after 'Other' is selected in the Dependent Picklist

     

    • Change the Dependent Picklist to any other value
      • The Text field should disappear

    Flow preview showing the 'Explain if Other' Text field hidden after a non-'Other' value is selected in the Dependent Picklist

    • Once the visibility works as expected, click Save, then Activate

    ____________________________________________________________________________________

    Nummer des Knowledge-Artikels

    005227554

     
    Laden
    Salesforce Help | Article