GroupingRule Interface

Grouping rule is an advanced way to configure node grouping.

It allows to define these types of groupings:

  • Group by base class.
  • Group by any property of the instance by a common value or a range of values.
  • Group multiple instances with the same label in to one ECInstance node. This can be used in cases when these instances represent the same object for the user.

The rule works in conjunction with other grouping options available in navigation specifications ChildNodeSpecification: groupByClass and groupByLabel. The grouping hierarchy looks like this:

  • Base ECClass grouping node (specified by base class grouping specification ClassGroup)
    • ECClass grouping node (specified by groupByClass property)
      • ECProperty grouping node 1 (specified by 1st PropertyGroup)
        • ECProperty grouping node 2 (specified by 2nd PropertyGroup)
          • ECProperty grouping node n (specified by n-th PropertyGroup)
            • Display label grouping node (specified by groupByLabel property)



Name Type Description
class SingleSchemaClassSpecification Specification of ECClass which should be grouped using this rule  
condition undefined | string Defines a condition for the rule, which needs to be met in order to execute it.  
groups GroupingSpecification[] Specifications of grouping which should be applied to matching ECInstances  
ruleType Grouping Used for serializing to JSON.  

Inherited properties

Name Type Inherited from Description
onlyIfNotHandled undefined | boolean RuleBase Should this rule should be ignored if there is already an existing
rule with a higher priority.
priority undefined | number RuleBase Defines the order in which presentation rules will be evaluated and executed.

Defined in

Last Updated: 20 September, 2019