Introduction
The background colour of a Card in a Card Container can be dynamically set a Formatting Rule.
Configuration
- Create the Shared Style you wish to apply to your card. This can be amended later if required.
- Open the Properties of the Card within the Card Container.
- In the Styles tab
- Add a Formatting Rule
- Style: Set this to be the Shared Style created in Step 1.
- Rule Expression: stipulate the condition that must be true for the Shared Style to be applied.
- use
_current
to access the values on your Card e.g. _current.Role. - For example,
_current.Role == "Design Engineer"
. This will apply the style where the Role field on the card is Design Engineer.
- use
- You will need to close and reopen the screen containing the card in order for the Formatting Rule to be applied.
- Note, only responsive functions are supported in the Rule Expression, see Responsive Function section on Functions