PhixFlow Help
Formatting Rule
This page is for data modellers or application developers who want to apply special formatting to data that meets specific criteria.
Overview
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 applied to a stream view attribute or to a layout component. If you apply a formatting rule to a layout template, all layout components created from the template will have a copy of the formatting rule applied.
Basic Settings
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.
Field | Description |
---|---|
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. |
Example
For the Status Type
attribute in a stream view, set the properties to:
Properties
For the Status Type
attribute in a stream view, set the properties to:
- Rule Expression:
- either
_field.value == "OK"
- or
_current.StatusSummary=="Validation Passed"
- either
- Style:
BackgroundColour-LightGreen
- Enabled: Tick
_field.value == "OK"
identifies the status type of OK and highlights the cell
identifies the status summary of Validation Passed and then highlights the corresponding status type cell._current.StatusSummary=="Validation Passed"
Resulting View
This displays the OK
field with a green background.
Formatting Rule Expressions
Variables
In formatting rules, the _form, _grid and _current act on a specific record. The record depends on the structure of layout components on the dashboard.
Formatting expression variable | Where | ||||
---|---|---|---|---|---|
Stream view directly on a dashboard | form on a dashboard | stream view on a form | form on a card | grid on a card | |
_form acts on the record | na | currently displayed on the form | currently displayed on the form | currently displayed on the card | backing the card |
_grid acts on the record | na | na | na | ||
_current acts on the record | currently displayed in the grid | na | currently displayed in the grid | currently displayed in the card | currently displayed in the grid |
Functions
For quick changes to screen appearance, you want formatting rules to be evaluated quickly. To ensure a quick response, only use the attribute functions that are evaluated by the client rather than the server; see the list of Responsive Attribute Functions.
Please let us know if we could improve this page feedback@phixflow.com