You are here:
Flow Conditional Visibility Considerations
Before you set visibility for a screen component, understand the behavior of conditional visibility in flows.
Required Editions
| View supported editions. |
Null and Empty Strings
A null value is evaluated the same way as a
{!$GlobalConstant.EmptyString}.
Unsupported Data Types and Operators
- These operators aren’t supported in conditional visibility.
- Was Visited
- Was Set
- These data types aren’t supported in conditional visibility, but you can reference
attributes and fields.
- Apex-defined data types
- Record variables
- You can’t reference these results in conditional visibility.
- Results of Apex-defined invocable actions
- Results of a flow referenced by the current flow with the Subflow element
- Any screen input component with Manually assign variables (advanced) selected isn’t available as a resource for conditional visibility on the same flow screen.
- Text that has merge fields included isn’t supported in values. Merge fields on their own are supported.
- The Is Null operator is supported for Boolean screen components, such as Checkbox and Toggle, only in flows that run in API version 64.0 and later.
Text Templates and Formulas
- Initial values are evaluated in text templates and formulas.
- Changes based on user input aren’t evaluated.
Hidden Screen Input Components
- Screen input components hidden by conditional visibility aren’t required when a user
runs the flow, even if
Requiredis set to {!$GlobalConstant.True}. When the component appears to the user, it’s treated as required. - If a screen input component is hidden because it doesn’t meet conditional visibility requirements, its value is set to null. But hidden picklists in a Dependent Picklists component aren’t set to null unless the entire Dependent Picklists component is hidden.
- In an Update Records element, if you update a field by using the value of a hidden
screen component, the field value is set to blank. Instead, update the field by using a
Formula resource that checks if the field is blank before setting the field value. For
example, use this formula.
IF( ISBLANK( {!myTextField} ), {!myOriginalFieldValue}, {!myTextField}) - When you define a condition to set component visibility, you can specify a variable as the resource value. The variable can traverse up to three object fields, for example, Contact.Account.Owner.
- If a hidden component becomes visible after the screen is revisited or has a validation error, the default text for the component isn't shown.
Sections and Conditional Field Visibility
If a section’s visibility conditions reference a component contained within the section, the entire section is hidden. If a section’s visibility conditions reference a component visibility condition and the visibility conditions evaluate as true, the section is visible.
Focus
When screen components or their parts are rendered after the screen is initially displayed, they’re never focusable. For example, if a component asynchronously fetches a list of tasks to display, the focus can’t be set to any of the tasks. If a screen component uses conditional visibility and appears only after user input, the focus can’t be set to any part of the screen component.
Circular Logic
Avoid circular logic in your conditions, which can result in poor performance, strange behavior, or an error when your flow is run.
Related Record Fields
Related record fields in your field visibility conditions work only for Lookup fields that have a value set when entering the screen.
Commas in Condition Values
If your condition value contains a comma, add a quotation mark at the beginning and the end of the value. For example, “Email, Phone, and Social Media”.
Performance
For the best performance, minimize the number and complexity of conditional visibility conditions on your screen components and record fields. There are other ways to control what screen components and record fields your screen flow users have access to view or update.
- Use a Section component. If you need multiple screen components or record fields to be visible using the same logic, put them in a Section component. Then, set the conditional visibility on the Section component, instead of on each component or field.
- Use the component’s Disabled attribute instead of conditional visibility. If you don’t
want your screen flow users to fill out a screen component’s input fields, but it’s OK for
them to see the fields, you can disable the component input fields. Set the screen
component’s Disabled attribute by selecting a resource with a Boolean value. For example,
set the Disabled attribute to a Formula resource that evaluates to
trueif another screen component is empty. - Use reactive formulas or Screen Actions. If you want to conditionally hide and set the default value of a screen component dynamically, depending on the value of another screen component, you don’tadd a screen component for each value. Instead, use a single conditionally visible screen component and use a reactive formula or screen action to populate the default value. See Reactive Screen Flow Formula Operators.

