StyleOverride Customization Rule

Style override rules allow customizing display style of specific types of ECInstances.

Attributes

Name Required? Type Default Meaning
Filtering
priority No number 1000 Defines the order in which presentation rules are evaluated.
onlyIfNotHandled No boolean false Should this rule be ignored if there is already an existing rule with a higher priority.
condition No ECExpression "" Defines a condition for the rule, which needs to be met in order to execute it.
Overrides
foreColor No ECExpression "" An expression whose result evaluates to a color value.
backColor No ECExpression "" An expression whose result evaluates to a color value.
fontStyle No ECExpression "Regular" An expression whose result evaluates to a font style value.

Color Value Formats

Colors in foreColor and backColor attributes may be evaluated to one of the following formats:

  • color name: Red, Blue, etc.
  • RGB: rgb(100, 200, 255)
  • HEX: #0f0f0f

Font Styles

Font style in fontStyle attribute may be evaluated to one of the following values:

  • Bold
  • Italic
  • Italic,Bold
  • Regular

Example

{
  "ruleType": "ImageIdOverride",
  "priority": 999,
  "stopFurtherProcessing": true,
  "condition": "ThisNode.IsOfClass(\"MyItem\", \"MySchema\")",
  "foreColor": "\"Black\"",
  "backColor": "iif(this.MyProperty, \"#ff0000\", \"rgb(0,255,255)\")",
  "fontStyle": "\"Italic,Bold\""
}

Last Updated: 08 January, 2020