You are here:
Example Flexcard Conditions Setup
Review examples to help you determine how to use states or conditions for your use case.
- Filter Policy Information by Using States
Users access their account policy information on a Flexcard, and you want to personalize the available actions and data depending on their account. - Let Users Hide Information in a Block
You have a Flexcard that shows the name, the ID, and the age for an account. The Flexcard also includes a block element that contains additional information such as the gender or the contact details. You want to enable users to expand or collapse the block element to show the information as needed.
Filter Policy Information by Using States
Users access their account policy information on a Flexcard, and you want to personalize the available actions and data depending on their account.
Action Button Based on Expiration Date
You want to emphasize to the policyholder when their policy is close to the expiration date. If the policy is up to date, the default state shows data fields and an action button to update account information. If the policy is about to expire, there’s a red border, an alert notification, and an action button to renew the policy.
Let Users Hide Information in a Block
You have a Flexcard that shows the name, the ID, and the age for an account. The Flexcard also includes a block element that contains additional information such as the gender or the contact details. You want to enable users to expand or collapse the block element to show the information as needed.
Set a private variable in the Flexcard to define and evaluate its value at run time.
First, create an action to set the value of the Flex.varname
private variable. Then, add a condition to display the contact information based on the
variable's value.
-
Configure a clickable element to show the Block element with extra case info:
- Access the block element on the Flexcard.
- Add an icon before the block.
- Add a card action to the icon with the Set Values type.
- Add a new Set Value.
-
In Key, enter
Flex.showinfo. -
In Value, enter
true.
-
Configure another clickable element to hide the Block element with the extra case
info:
- Add an icon in the block with a different image from the icon that you added before the block.
- Add a card action to the icon with the Set Values type.
- Add a new Set Value.
-
In Key, enter
Flex.showinfo. -
In Value, enter
false.
-
To hide the Block element by default, add a condition that checks the value of
Flex.showinfo. Perform the following tasks:
- Select the block, and in its Properties, add a new condition.
-
In Data Field, enter
Flex.showinfo. - From the Operator picklist, select =.
- In Value, enter true.
In preview, the Flexcard’s JSON code includes the showinfo variable.

