Flexcards15% of the exam
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.
Implement conditional rendering logic to show/hide elements or alter component appearance based on conditions using states.
~7 min read · 4 practice questions ·
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
undefinedchecks. - 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
State evaluation
- Detail
- Top to bottom; the first state whose conditions are met shows
Recommended order
- Detail
- Most complex, simpler, no-condition state, then blank card state
Null result
- Detail
- "Use this state when the FlexCard returns a null value" (managed designer: Blank Card State)
Repeat Records and states
- Detail
- Records meeting no state's condition are hidden
Empty-value check
- Detail
- Enter undefined as the value
Variables as values
- Detail
- Not allowed, except Parent.attr for a state in a child Flexcard
Preload default
- Detail
- On for conditional elements; on by default for Block
Recursive child condition
- Detail
- A false record hides its nested records
Data JSON state
- Detail
- StateName under each card in the cards object; child cards show only their name
Sources for this section (5)
- Flexcard Stateshelp.salesforce.com (opens in a new tab)
- Configure Flexcard Settingshelp.salesforce.com (opens in a new tab)
- Element Conditionshelp.salesforce.com (opens in a new tab)
- Embed Flexcard in a Flexcardhelp.salesforce.com (opens in a new tab)
- Preview and Debughelp.salesforce.com (opens in a new tab)
- 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?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Omnistudio Developer pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 46 lessons of the Omnistudio Developer guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (4 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams