Sorting rule
TypeScript type: SortingRule.
Sorting rules provide a way to either disable sorting or sort instances by specific properties. There are 2 types of sorting rules for both of these scenarios.
Property sorting rule
Rule to configure sorting for certain ECInstances in the hierarchy and/or content. It is possible to configure different sorting for different types of ECInstances.
Multiple sorting rules may be applied for the same instances - in this case the
instances are first sorted by the highest priority rule and then the lower priority ones.
Note: This rule is not meant to be used to sort grouping nodes, custom nodes or other non ECInstance type of nodes.
Attributes
Attribute: requiredSchemas
A list of ECSchema requirements that need to be met for the rule to be used.
|
Result |
minVersion: 1.0.2 |
 |
minVersion: 2.0.2 |
 |
Attribute: priority
Defines the order in which rules are handled - higher priority means the rule is handled first. If priorities are equal, the rules are handled in the order they're defined.
|
|
Type |
number |
Is Required |
No |
Default Value |
1000 |

Attribute: condition
Defines a condition which needs to be met in order for the rule to be used. The condition is an ECExpression which has to evaluate to a boolean value.
Condition evaluation result |
Result |
true |
 |
false |
 |
Attribute: class
Specifies ECClass whose ECInstances should be sorted.

Attribute: isPolymorphic
Specifies that class
attribute defined in this rule should be handled polymorphically.
|
|
Type |
boolean |
Is Required |
No |
Default Value |
false |
|
Result |
isPolymorphic: true |
 |
isPolymorphic: false |
 |
Attribute: propertyName
Specifies name of the property which should be used for sorting.
|
|
Type |
string |
Is Required |
Yes |

Attribute: sortAscending
Specifies whether instances should be sorted in ascending order or descending.
|
|
Type |
boolean |
Is Required |
No |
Default Value |
true |
|
Result |
sortAscending: true |
 |
sortAscending: false |
 |
Disabled sorting rule
Rule to disable sorting for certain ECInstances in the hierarchy and/or content.
Note: Disabling sorting increases performance
Attributes
Attribute: requiredSchemas
A list of ECSchema requirements that need to be met for the rule to be used.
|
Result |
minVersion: 1.0.2 |
 |
minVersion: 2.0.2 |
 |
Attribute: priority
Defines the order in which rules are handled - higher priority means the rule is handled first. If priorities are equal, the rules are handled in the order they're defined.
|
|
Type |
number |
Is Required |
No |
Default Value |
1000 |

Attribute: condition
Defines a condition which needs to be met in order for the rule to be used. The condition is an ECExpression which has to evaluate to a boolean value.
Condition evaluation result |
Result |
true |
 |
false |
 |
Attribute: class
Specifies ECClass whose instances should not be sorted.

Attribute: isPolymorphic
Specifies that class
attribute defined in this rule should be handled polymorphically.
|
|
Type |
boolean |
Is Required |
No |
Default Value |
false |
|
Result |
isPolymorphic: true |
 |
isPolymorphic: false |
 |
Last Updated:
24 January, 2023