Loading

How to Conditionally Show a Screen Component Using a Dependent Picklist in Salesforce Screen Flow

Udgivelsesdato: Oct 13, 2026
Beskrivelse

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øsning

This article explains how to configure a Salesforce Screen Flow so that a Text component appears only when a specific value, such as "Other", is selected in a Dependent Picklist component, and stays hidden for all other values.

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 opens.
  • Click 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 NamerecordId
Data TypeRecord
Available for inputCheck this box

Note: The name of the Variable must be exactly recordId, without any quotation marks 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 the Dependent Picklist Component and drag it onto your Screen.

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

  • 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 the Dependent Picklist Field is Dependent_Picklist__c.

Note: Update these values to match the object and field API names in your org.

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, set the Label to Explain if Other.
    • The API Name populates automatically based on the Label.

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

  • 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 that you added earlier.
  • In Resource, select the Dependent Picklist value and configure it as shown in the following table.
Resource{!Dependency.middleValue}
OperatorEquals
ValueOther

Step 4: Test and Save the Flow

  • Click Run on the Flow Builder canvas to test.
  • On the Screen, select Other from the Dependent Picklist.
    • The Text field appears.

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 disappears.

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

  • When the visibility works as expected, click Save, and then click Activate.
Vidensartikelnummer

005227554

 
Indlæser
Salesforce Help | Article