Indicates if a specified index ignores duplicate records.


UNIQUE([<.mdx filename expC>,] [<index position expN> [,<alias>]])

<.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.

<index position expN>

the numeric position of the index tag in the specified .MDX file, or the position of the index in the list of open indexes.


The work area you want to check.


Unlike most functions, the first parameter is optional. If you omit the first parameter, the remaining parameters shift forward one; the second parameter becomes the first parameter, and so on.


UNIQUE( ) returns true if the index tag specified by the <index position expN> parameter was created with the UNIQUE keyword or with SET UNIQUE ON; otherwise, it returns false.

The index must be referenced by number. If you do not specify an .MDX file to check, index numbering in the list of open indexes is complicated if you have open .NDX indexes or you have open non-production .MDX files. For more information on index numbering, see SET INDEX. Either way, it is often easier to reference an index tag by name by using the TAGNO( ) function to get the corresponding position number.

If you do not specify an index tag, UNIQUE( ) checks the current master index tag and returns false if there is no master index.

If the specified .MDX file or index tag does not exist, UNIQUE( ) returns false.


No equivalent.