INDEXORDER()

From Lianjapedia
Revision as of 05:59, 10 February 2012 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

Purpose

Function to return the currently selected master index number

Syntax

INDEXORDER([<workarea | alias>])

See Also

CLOSE INDEX, CREATE VIEW, IFILECOUNT(), INDEX, INDEXEXT(), INDEXKEY(), LOOKUP(), NDX(), ORDER(), REINDEX, RLOOKUP(), SEEK, SET INDEX, SET ORDER, SYS(), USE

Description

The INDEXORDER() function returns the currently selected master index number as specified with the SET ORDER TO command. If no index files are selected, it returns -1. If index file are open, and SET ORDER has been set to 0, the INDEXORDER() function returns 0. If the optional <workarea | alias> is specified, then the function will operate in that <workarea | alias>. When used in conjunction with the NDX() or INDEXKEY() functions, the INDEXORDER() function will return the index file name or index key of the master index. The INDEXORDER() function is synonymous with the ORDER() function.

Example

use patrons index name, event
? indexorder()
         1
set order to 2
? indexorder()
         2