# Flexcard states, conditions and conditional rendering

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

When to use Flexcard states versus element conditions, how state order and the Blank Card State decide what shows, why records disappear when no state matches, and how condition groups, Flex.index, show/hide toggles and Preload Conditional Component shape what renders.

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

**Official exam objective:**

> Advise on utilizing conditional rendering and state variables to dynamically adjust card appearance or content based on the underlying data or user interaction.

## What the exam expects

- Recommend states when the layout or many elements change with the data, and element conditions for a single element, field or action.
- Order states so the right one wins, and use a Blank Card State for "no data" on the Managed Package Runtime.
- Explain why repeated records vanish when no state's condition matches them.
- Specify conditions correctly: empty-value checks, literal values only, and condition groups joined by AND or OR.
- Recommend Flex.index conditions, Set Values show/hide toggles and turning off Preload Conditional Component for performance.

Key terms: **state** (a card-level layout with its own elements, styling, actions and condition), **element condition** (a rule that shows one element, field or action), **condition group** (conditions wrapped like parentheses), **Blank Card State** (the state shown when the data source returns no records), **Preload Conditional Component** (renders hidden elements' HTML in advance).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Which state shows | The first state, top to bottom, whose conditions are true | [Add States and Conditions](https://trailhead.salesforce.com/content/learn/modules/omnistudio-flexcards-building-and-publishing/add-flexcard-states-and-conditions) |
| Recommended state order | Complex conditions, simple, no conditions, Blank Card State (Managed Package Runtime page) | [Add Conditions to a Flexcard State](https://help.salesforce.com/s/articleView?id=sf.os_add_conditions_to_a_flexcard_state.htm&language=en_US&type=5) |
| Blank Card State | Displays when no data is returned (Managed Package Runtime page) | [Flexcard States](https://help.salesforce.com/s/articleView?id=sf.os_flexcard_states.htm&language=en_US&type=5) |
| No matching state | Records 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) |
| States vs conditions | States load faster than many conditional elements in one state | [Test and Activate Flexcards](https://trailhead.salesforce.com/content/learn/modules/omnistudio-flexcard-fundamentals/test-and-activate-flexcards) |
| Empty-value check | Enter undefined as the value | [Set Up Conditions to a Flexcard Element](https://help.salesforce.com/s/articleView?id=xcloud.os_add_conditions_to_a_flexcard_element_35370.htm&language=en_US&type=5) |
| Variables as values | Not allowed, except Parent.attr for a child card's state element | [Set Up Conditions to a Flexcard Element](https://help.salesforce.com/s/articleView?id=xcloud.os_add_conditions_to_a_flexcard_element_35370.htm&language=en_US&type=5) |
| Flex.index < 3 | Element shows on the first three cards | [Set Up Card Actions to Update a Flexcard](https://help.salesforce.com/s/articleView?id=os_flexcard_card_actions_26671.htm&language=en_US&type=5) |
| Preload Conditional Component | On by default; deselect for performance; Blocks need it turned off explicitly | [Set Up Conditions to a Flexcard Element](https://help.salesforce.com/s/articleView?id=xcloud.os_add_conditions_to_a_flexcard_element_35370.htm&language=en_US&type=5) |

## Check yourself

- Why should a state with no conditions sit below conditional states?
- When is a condition on a Menu action better than a new state on a Standard Runtime card?
- How do you test for an empty field in a Flexcard condition?
- When does a Standard Runtime card with Preload Conditional Component on still slow the page?
- What does a Flex.index < 2 condition display?

## Sources

- [Set Up Conditions to a Flexcard Element](https://help.salesforce.com/s/articleView?id=xcloud.os_add_conditions_to_a_flexcard_element_35370.htm&language=en_US&type=5)
- [Omnistudio Flexcards](https://help.salesforce.com/s/articleView?id=sf.os_omnistudio_flexcards_24388.htm&language=en_US&type=5)
- [Test and Activate Flexcards](https://trailhead.salesforce.com/content/learn/modules/omnistudio-flexcard-fundamentals/test-and-activate-flexcards)
- [Add States and Conditions](https://trailhead.salesforce.com/content/learn/modules/omnistudio-flexcards-building-and-publishing/add-flexcard-states-and-conditions)
- [Add Conditions to a Flexcard State (Managed Package)](https://help.salesforce.com/s/articleView?id=sf.os_add_conditions_to_a_flexcard_state.htm&language=en_US&type=5)
- [Flexcard States (Managed Package)](https://help.salesforce.com/s/articleView?id=sf.os_flexcard_states.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)
- [Set Up Card Actions to Update a Flexcard](https://help.salesforce.com/s/articleView?id=os_flexcard_card_actions_26671.htm&language=en_US&type=5)
- [Explore Key Flexcard Features](https://trailhead.salesforce.com/content/learn/modules/omnistudio-flexcard-fundamentals/explore-key-flexcard-features)

## About the full unit

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