The requested page is not available for the requested platform. You are viewing the content for Default platform.

Expression

  • 2 min to read

An Expression format condition allows you to use complex conditions to apply formatting.

Create a Format Rule in the WinForms Designer

To format values according to the Expression condition, click the menu button of the required data item and select Add Format Rule | Expression.

This invokes the Expression dialog that allows you to specify the required expression. For instance, the following image displays a Grid dashboard item whose rows are filled in green if the Extended Price/Quantity values are greater than 150 000 and 7 500, respectively.

FormatConditionExpressionDialog

You can pass static values when creating conditions or pass a dashboard parameter to apply conditional formatting dynamically. To learn more, see Passing Parameter Values.

Create a Format Rule in the Web Dashboard

In the Conditional Formatting section, click the plus button to add a new format rule:

Select the data item you want to format and set the condition type to Expression:

In the opened settings click the Edit... button to specify a condition:

This invokes the Expression dialog that allows you to specify the required expression. For instance, the following image displays a Grid dashboard item whose rows are filled in green if the Extended Price/Quantity values are greater than 150 000 and 7 500, respectively.

You can pass static values when creating conditions or pass a dashboard parameter to apply conditional formatting dynamically. See Pass Parameter Values for more information.

Create a Format Rule in Code

To create the Expression format condition in code, create a FormatConditionExpression class instance and specify the following settings.

Assign the resulting FormatConditionExpression object to the DashboardItemFormatRule.Condition property.

How to: Use Dashboard Parameters with the Expression Format Condition