Option calculations are written in the same way as most other calculations; however, an option calculation returns a result that is treated as an option for the purposes of visibility, performance standards, status indicators and other features that work with options such as performance alerts.
It is necessary to create a list of options for an option calculation which match the possible results of the equation.
Keep in mind that option list ordering affects the sorting behavior people see when clicking on column headers in reports, embedded reports, front page reports and the performance history. In each of these areas, the data will be sorted according to the option list order. If the Best value advanced property has been set, then this will also affect the sorting order.
Create an option calculation to trigger a performance alert
Option calculations, especially when used in combination with history calculations, can be used to create indicators of subtle or complex changes which can then be used to trigger performance alerts.
This example shows how a single selection field recording sleep quality (above) in a wellness form can be used, in conjunction with history calculations (not shown) to generate an option calculation result that is compatible with the performance alerts tool.
The option calculation shown here returns a result of Yes when the individual’s average sleep quality over the past seven days is more than one standard deviation lower than their all time average sleep quality.