Ordering the results - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

You can order the results by adding an OrderBy() clause on the query. This allows you to order by properties directly on the returned object.

The order can be defined in multiple ways using the extension on the query object, for example:

Order By

Syntax

Order by a specific property definition UID, as default, this will sort ascending.

lobjDynamicQuery.Query.OrderBy("DEVWeight")

Order by a specific property definition UID with an overload of the sort order.

lobjDynamicQuery.Query.OrderBy("DEVWeight", Order.Descending)

  • You cannot order by properties on related items.

  • You can sort by multiple properties.