Loading

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

Data pubblicazione: Nov 11, 2025
Descrizione

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.

Risoluzione

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

     

    • Click New Resource, and select Variable

     

     

    • 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

     

     

    • 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

     

    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

    • 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

     

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

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

    ________________________________________________________________________________________

    Written by: Eric Praud | Forum Ambassador
    Eric is a Salesforce Platform Manager at Activ8 Energies and has been working in the Salesforce ecosystem for the past 15 years. He started his Salesforce career as a Salesforce support agent. Like many others, he stumbled across the platform accidentally and hasn’t looked back since. Eric is very active in the Answers community and has been a Salesforce MVP since March 2021. 

    Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials).  Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third  Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality,  usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a “best” answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.

    If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed

     

       

      Numero articolo Knowledge

      005227554

       
      Caricamento
      Salesforce Help | Article