Returns the index number of the specified index.

Syntax

TAGNO([<tag name expC> [,<.mdx filename expC> [,<alias>]]])

<tag name expC>

The name of the index tag that you want to return the position of. If you don't specify a tag name, TAGNO( ) returns the position of the current master index.

<.mdx filename expC>

The .MDX file that contains the index tag you want to check. The .MDX must be opened in the specified work area. If omitted, all open indexes, including the production .MDX file, are searched.

<alias>

The work area you want to check.

Description

TAGNO( ) returns a number that indicates the position of the specified index name in the list of open indexes in the current or specified work area. The order of indexes is determined by the order in which they were opened with the USE or SET INDEX commands.

If you don't specify a tag name, TAGNO( ) returns the number of the master index. If you don't specify an .MDX file name, TAGNO( ) searches the list of open index files in the specified work area, including .NDX files. If you don't specify an alias, TAGNO( ) operates on the list of open indexes in the current work area.

TAGNO( ) returns zero if the specified index tag or .MDX file does not exist.

Use TAGNO( ) to get the index number of an index when you know the tag name for functions like DESCENDING( ), FOR( ), KEY( ), and UNIQUE( ).

OODML

No equivalent.