A Formatting rule allows you to specify an expression which evaluated can apply the selected style to the parent object. It allows to apply styles conditionally, depending on current values displayed on the screen.
A Formatting Rule can be assigned to a Stream View Attribute or to a Layout Component. When assigned to a Layout Template, all Layout Components created from the Template will have a copy of the Formatting Rule assigned.
For information about the properties toolbar, and about the sections Parent Details, Analysis Models, Description and Audit Summary, see Common Properties. For a full list of all the PhixFlow property tabs and windows, see Property Tabs.
For each Formatting Rule, the following settings are configured:
Field | Description |
---|---|
Basic Settings | |
Rule Expression | Expression to be evaluated on order to determine should the Style be applied. This expression takes PhixFlow Internal Variables including _current, _field, _itemNumber and _this. See examples below. |
Style | Style to be applied when the Rule Expression evaluates to true. |
Order | Order of the Rule Expression. |
Enabled | Flag showing is the Rule Expression enabled. |
Stop If True | Flag showing if other rules shouldn't be applied if the current Rule applies. |
Description | |
Description | Description of this Formatting Rule. |
Examples
Field | Input/Value |
---|---|
Rule Expression | _field.value == "OK" |
Style | BackgroundColour-LightGreen |
Enabled | true |
Creating the above configuration record for the View Attribute "Status Type" will produce the following result on the view.
The same result above could also be produced by the following configuration on Stream View Attribute "Status Type", which uses the value of another attribute "Status Summary" on the current record.
Field | Input/Value |
---|---|
Rule Expression | _current.StatusSummary=="Validation Passed" |
Style | BackgroundColour-LightGreen |
Enabled | true |