GetSortOrder

The GetSortOrder function retrieves the current sort order for the Contacts database.

Syntax

HHPRTAG GetSortOrder(BOOL fDatabaseSort);

At a Glance

Header file: Addrstor.h
Platforms: H/PC
Versions: 1.0 and later

Parameters

fDatabaseSort
Whether to retrieve the actual sort order, or what the user perceives as the sort order. If this parameter is TRUE, GetSortOrder retrieves the actual sort order; otherwise, it retrieves the user-perceived sort order.

Return Values

The return value is the property tag that identifies the property on which the Contacts database is currently being sorted.

Remarks

Some properties, such as HHPR_LAST_FIRST_NAME, cannot be used to sort the database. If fDatabaseSort is TRUE, GetSortOrder returns the actual property used to sort the database. In the case of HHPR_LAST_FIRST_NAME, the actual sort-order property is HHPR_SURNAME. The following table shows user-perceived sort-order properties and the actual properties to which they correspond:

User-Perceived Sort Property Actual Sort Property
HHPR_FIRST_LAST_NAME HHPR_GIVEN_NAME
HHPR_LAST_FIRST_NAME HHPR_SURNAME
HHPR_HOME_ADDRESS HHPR_HOME_ADDRESS_STREET
HHPR_OFFICE_ADDRESS HHPR_OFFICE_ADDRESS_STREET
HHPR_OTHER_ADDRESS HHPR_OTHER_ADDRESS_STREET

See Also

SetSortOrder, OpenAddressBook