2.13.1 SortOrder Structure
The SortOrder structure describes one column that is part of a sort key for sorting rows in a table. This structure specifies both the column and the direction of the sort.
SortOrder structures are typically combined into a SortOrderSet structure, as specified in section 2.13.2, to describe multiple sort keys and directions in a RopSortTable ROP request ([MS-OXCROPS] section 2.2.5.2).
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PropertyType (bits 0-15) |
PropertyId (bits 16-31) |
||||||||||||||||||||||||||||||
Order |
PropertyType (bits 0-15) (2 bytes): This value identifies the data type of the column to be used for sorting. If the property is multivalued, for example, the MultivalueFlag bit (0x1000) is set in the PropertyType field, and clients MUST also set the MultivalueInstance bit (0x2000). In this case, the server MUST generate one row for each individual value of a multivalue column and sort the table by individual values of that column.
PropertyId (bits 16-31) (2 bytes): This value identifies the column to be used for sorting.
Order (1 byte): This field MUST be set to one of the values listed in the following table.
Order name |
Order value |
Meaning |
---|---|---|
Ascending |
0x00 |
Sort by this column in ascending order. |
Descending |
0x01 |
Sort by this column in descending order. |
MaximumCategory |
0x04 |
This is an aggregated column in a categorized sort, whose maximum value (within the group of items with the same value as that of the previous category) is to be used as the sort key for the entire group. |
-
If the MultivalueFlag bit is set, the MultivalueInstance bit MUST also be set, and if the MultivalueInstance bit is set, the MultivalueFlag bit MUST also be set. In other words, it is not possible to sort on all values of a multivalue column; one row per value MUST be generated, and individual values MUST be used in the sort.
-
The MaximumCategory bit causes groups of messages in a categorized sort to be ordered by the maximum value of a column across an entire group. For example, a conversation view is grouped by the value of the PidTagConversationTopic property ([MS-OXOMSG] section 2.2.1.5). In this case, Groups are sorted by the value of the group's most recent (maximum) PidTagMessageDeliveryTime property ([MS-OXOMSG] section 2.2.3.9), and within each group messages are sorted by the value of the PidTagConversationIndex property ([MS-OXOMSG] section 2.2.1.3).