# Flexcard states and conditional visibility

*Omnistudio Developer Study Guide · Flexcards · Last updated October 27, 2026 · https://www.certifyforce.com/study-guide/omnistudio-developer/flexcards/flexcard-states-and-conditional-visibility*

How to configure Flexcard states and their top-to-bottom evaluation, the null-value state, element, menu-action and listener-action conditions, Preload Conditional Component, conditions on recursive child cards, editing conditions on an active card, and reading StateName in Preview.

- Certification: Salesforce Omnistudio Developer
- Exam section: Flexcards
- Study guide: https://www.certifyforce.com/study-guide/omnistudio-developer

**Official exam objective:**

> Implement conditional rendering logic to show/hide elements or alter component appearance based on conditions using states.

## What the exam expects

- Build states with conditions, order them correctly and add a state for a null data source result.
- Add conditions to elements, to actions on a menu and to actions on an event listener, including condition groups and `undefined` checks.
- Predict how a condition on a recursive child Flexcard affects nested records, and when to deselect Preload Conditional Component.
- Edit conditions on an active card without breaking the pages that use it, and confirm a card's state from the Preview Data JSON.

Key terms: **state** (a layout of fields and actions shown when its conditions are met), **condition group** (conditions combined like parentheses), **Preload Conditional Component** (renders hidden conditional elements in the DOM), **StateName** (the Data JSON key that names a rendered card's state).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| State evaluation | Top to bottom; the first state whose conditions are met shows | [Flexcard States](https://help.salesforce.com/s/articleView?id=xcloud.os_add_conditions_to_a_flexcard_state_35695.htm&language=en_US&type=5) |
| Recommended order | Most complex, simpler, no-condition state, then blank card state | [Flexcard States](https://help.salesforce.com/s/articleView?id=xcloud.os_add_conditions_to_a_flexcard_state_35695.htm&language=en_US&type=5) |
| Null result | "Use this state when the FlexCard returns a null value" (managed designer: Blank Card State) | [Flexcard States](https://help.salesforce.com/s/articleView?id=xcloud.os_add_conditions_to_a_flexcard_state_35695.htm&language=en_US&type=5) |
| Repeat Records and states | Records meeting no state's condition are hidden | [Configure Flexcard Settings](https://help.salesforce.com/s/articleView?id=xcloud.os_set_up_a_flexcard_in_the_flexcard_designer_37646.htm&language=en_US&type=5) |
| Empty-value check | Enter undefined as the value | [Element Conditions](https://help.salesforce.com/s/articleView?id=sf.os_add_conditions_to_a_flexcard_element_35370.htm&language=en_US&type=5) |
| Variables as values | Not allowed, except Parent.attr for a state in a child Flexcard | [Element Conditions](https://help.salesforce.com/s/articleView?id=sf.os_add_conditions_to_a_flexcard_element_35370.htm&language=en_US&type=5) |
| Preload default | On for conditional elements; on by default for Block | [Element Conditions](https://help.salesforce.com/s/articleView?id=sf.os_add_conditions_to_a_flexcard_element_35370.htm&language=en_US&type=5) |
| Recursive child condition | A false record hides its nested records | [Embed Flexcard in a Flexcard](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_flexcard_inside_another_flexcard_29030.htm&language=en_US&type=5) |
| Data JSON state | StateName under each card in the cards object; child cards show only their name | [Preview and Debug](https://help.salesforce.com/s/articleView?id=xcloud.os_preview_a_flexcard_41051.htm&language=en_US&type=5) |

## Check yourself

- Why should a state with no conditions sit below the conditional states?
- When can a condition value be a variable?
- Why is Preload Conditional Component left on for a Block?
- Which Data JSON object tells you a rendered card's state?

## Sources

- [Set Up Conditions Based on Flexcard States](https://help.salesforce.com/s/articleView?id=xcloud.os_add_conditions_to_a_flexcard_state_35695.htm&language=en_US&type=5)
- [Set Up Conditions to a Flexcard Element](https://help.salesforce.com/s/articleView?id=sf.os_add_conditions_to_a_flexcard_element_35370.htm&language=en_US&type=5)
- [Configure Flexcard Settings](https://help.salesforce.com/s/articleView?id=xcloud.os_set_up_a_flexcard_in_the_flexcard_designer_37646.htm&language=en_US&type=5)
- [Embed Flexcard in a Flexcard](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_flexcard_inside_another_flexcard_29030.htm&language=en_US&type=5)
- [Preview and Debug a Flexcard](https://help.salesforce.com/s/articleView?id=xcloud.os_preview_a_flexcard_41051.htm&language=en_US&type=5)
- [Clone a Flexcard or Create a New Version](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcards_versioning_and_cloning_42243.htm&language=en_US&type=5)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 4 linked practice questions, and unlimited timed mock exams are included with the Omnistudio Developer pack (USD $19): https://www.certifyforce.com/practice-exams
