User Guide
×
Menu
Index
 

Conditional Formatting of Text Fields and Shapes

 
Conditional Formatting of Text Fields
 
 
In this example, the page includes parameters for dataset year.
An expression will be used for the text field to indicate which dataset year is currently selected when the parameter is changed.
Conditional formatting will also be applied to the text field to use a different font color per year.
A text field has been added to the page - at the top next to the flag.
 
 
With the text field still selected and in Edit Mode, click the EXPR option in the toolbar to open the expression editor.
 
Edit the expression syntax and type parametervalue, then use SHIFT+@ to display the available parameter references.
Select Dataset year.
 
The updated expression should now read parametervalue(Dataset year) and it should have a green check mark with the returned value as “2019.”
Click the Apply button.
 
With the text field still selected and in Edit Mode, click the CONDITIONAL FORMATTING option in the toolbar.
 
 
The Conditional Formatting window will open.
 
Click the + sign to define a new condition.
 
In this example, if the value “equals” 2019, the font will be displayed in bold and blue font.
If the value “equals” 2020, the font will be displayed in bold and blue font
.
Click the Apply button at the bottom of the screen.
 
 
Adjust the font size
 
Since the value for the text field met the conditional criteria, the text field is now being shown in the font color and style that was specified for the conditional formatting.
 
The text field’s expression is linked to the page parameters, changing the year of the parameter on the page will update the text field.
 
 
 
Conditional Formatting of Shapes
 
The required steps to use conditional formatting in shapes are the same as text fields.
The following is just one example for using conditional formatting with Shapes.
 
 
 
 
In this example, the page includes a shape.
 
 
Next, a conditional formatting rule will be defined to assign a different color to the shape, if specific criteria is met.
 
Conditional formatting will be applied to the color of the shape.
A rule is used to determine if green should be applied, which would replace the default color red.
 
The conditional formatting rule above states that if the expression’s data value for the selected make, (e.g., Alpina) is greater than “0.7”, the color of the shape will be formatted as green.
If the conditional formatting rule does not apply, the color of the shape will remain unchanged.
 
Since the value of 0.7 meets the conditional formatting rule, the color of the shape changed to green.