Passing Parameter Values
In this topic, you will learn how to pass parameter values to a dashboard.
Filtering
You can apply filtering to a specific dashboard item according to the current parameter value(s) using the Filter Editor.
In the Filter Editor, you can compare a field value with the following objects.
- A static value (represented by the
icon). Click this button to switch to the next item mode ("another field value"), to compare the field value with another field value.
- Another field value (represented by the
icon). Click this button to switch to the next item mode (“parameter value”), to compare the field value with a parameter value.
- A parameter value (represented by the
icon). Click this button to switch back to the initial mode ("static value"), to compare the field value with a static value.
Thus, to compare a field value with a parameter value, click the button, then click the
button.
Conditional Formatting
You can apply conditional formatting to a dashboard item according to the current parameter value. It allows you to format dashboard item elements dynamically.
To reference a dashboard parameter in a format rule, click the menu button of the required data item and select Add Format Rule | Expression:
In the invoked Expression dialog, specify the format rule and other settings. To compare a field value to a parameter value, click the button of the second operand, and then click the
button. After that, click the operand's placeholder and select the dashboard parameter.
The icon will be displayed next to the selected parameter.
Click OK to save the created format rule. Now, when you change the dashboard parameter value, the dashboard item is formatted according to the parameter value.
Tip
For more information on conditional formatting, refer to the following article: Conditional Formatting.
Calculated Fields
You can use parameters when you construct expressions for calculated fields. This allows you to dynamically evaluate values of the calculated field depending on the current parameter value.
To reference a dashboard parameter in the calculated field expression, add or edit a calculated field. In the invoked Expression Editor, select the dashboard parameter from the Parameters section.
Click OK to save the expression. Now, when you change the dashboard parameter value, the calculated field values are changed according to the specified expression.
Tip
For more information on calculated fields in WinForms Dashboard, refer to the following article: Calculated Fields.
Window Calculations
You can use dashboard parameters in window calculations. This allows you to apply specific computations to measure values depending on the current parameter value.
To reference the dashboard parameter value in a window calculation, create a window calculation of the Custom type:
Then, select the calculation type and click the Edit in Expression Editor button:
In the invoked Expression Editor window, construct an expression. To reference a dashboard parameter, select the Parameters category and double-click the required parameter from the list of the available dashboard parameters.
Click OK to apply the specified settings. Now, when you change the dashboard parameter value, the calculation values are changed according to the specified expression.
Tip
For more information on window calculations in WinForms Dashboard, refer to the following article: Window Calculations.