Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

SELECTINFO

Returns information about a select list.

Synopsis

SELECTINFO(listnum,key)

Arguments

listnum An expression that resolves to an integer between 1 and 10 (inclusive) that identifies a select list. This value is defined in the SELECT statement. listnum 0 is not valid for Caché MVBasic.
key An expression that resolves to an integer code indicating what select list information to return. The available values are 1 (active), and 3 (count).

Description

The SELECTINFO function returns different values depending on the value of key:

  • If key is 1, SELECTINFO returns a boolean value, indicating whether the specified select list is active. 1=select list is active; 0=select list is inactive. A SELECT command activates a select list. When a READNEXT attempts to read past the last item of the select list, the list is inactivated.

  • If key is 3, SELECTINFO returns an integer value, specifying the total number of items in the select list. It returns 0 if the select list is not active, or if an active select list does not contain any items.

Examples

The following example uses the SELECTINFO function to return information about select list 4:

slist=4
PRINT SELECTINFO(slist,1)
PRINT SELECTINFO(slist,3)

See Also

Feedback