Specifies the Sorting order of the search results when searching with the DataFinder.
Object.OrderBy
| Object | Condition <DataFinder>
Object with this property |
| Object.OrderBy | Enumeration with read and write access and the following selection terms:| 0 | eNoOrderBy | | | 1 | eOrderByAscending | | | 2 | eOrderByDescending | |
|
 | Note The DataFinder can only order by base properties and optimized custom properties. |
 | Note The search is slowed down if the query requests the search results ordered. |
The following example generates an extended search for channels and sorts the search results in descending order after the first search condition:
Dim oMyDataFinder, oMyQuery, oMyOrderedCondition
Set oMyDataFinder = Navigator.ConnectDataFinder("My DataFinder")
Set oMyQuery = oMyDataFinder.CreateQuery(eAdvancedQuery)
oMyQuery.ReturnType = eSearchChannel
Call oMyQuery.Conditions.Add(eSearchChannel, "maximum", "<", 1.5)
Call oMyQuery.Conditions.Add(eSearchChannelGroup, "description", "=", "Test Data")
Set oMyOrderedCondition = oMyQuery.Conditions(1)
oMyOrderedCondition.OrderBy = eOrderByDescending
Call oMyDataFinder.Search(oMyQuery)