SELECTINDEX

SELECTINDEX

Top  Previous  Next

 

The SELECTINDEX command constructs a select list from an alternate key index.

 

 

Format

 

SELECTINDEX {DICT} file.name index.name {, value} {TO list} {COUNT.SUP}

 

where

 

file.nameis the name of the file.

 

index.nameis the name of an index within the specified file.

 

valueis the value that the indexed field must have to be included in the result list.

 

TO listspecifies the list to be created. If omitted, the default list (list 0) is created.

 

COUNT.SUPsuppresses display of the number of items in the select list.

 

 

If the value element is omitted, the SELECTINDEX command constructs a select list containing all the indexed values in the specified alternate key index. It is equivalent to use of the QMBasic SELECTINDEX statement with no indexed value.

 

If the value element is included, the SELECTINDEX command constructs a select list containing the ids of all records in which the indexed field identified by index.name has the given value. It is equivalent to use of the QMBasic SELECTINDEX statement with an indexed value.

 

Both @SELECTED and @SYSTEM.RETURN.CODE will be set to the number of item selected.