sx_IndexOrd

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_IndexOrd

VB Declaration

Declare Function sx_IndexOrd Lib "Apollo9.dll"() As Integer

C Declaration

SHORT FAR PASCAL sx_IndexOrd (VOID);

Description

Gets the current order number identifying the order work area.

Return Value

For NTX and IDX files, this is the identifying order number for the current work area originally returned by sx_Index or sx_IndexOpen. For CDX and NSX files, this is the area assigned to the tag when the file was opened (or when a new tag was created with sx_IndexTag).

If no index is open, or natural order has been selected, zero will be returned.

VB Example

' display current index order, name, etc.

BoxOrder.Text = sx_IndexOrd()

BoxName.Text = sx_IndexName(sx_IndexOrd())

BoxKey.Text = sx_IndexKey()

C Example

// switch orders when header clicked

if (sx_IndexOrd() == sx_TagArea("names"))

sx_SetOrder(sx_TagArea("cities"));

else

sx_SetOrder(sx_TagArea("names"));

sx_GoTop();

See Also

sx_SetOrder, sx_TagArea