Previous Page | Next Page

SAS Component Language Dictionary

SELECTED



Returns the number of the row that corresponds to a user's choice in a selection list
Category: Extended Table

Syntax
Details
Example
See Also

Syntax

row=SELECTED(nval);

row

contains the number of the selected row, or -1 if the value specified for nval is greater than the total number of selections.

Type: Numeric

nval

is the number of the selection.

Type: Numeric


Details

You can use SELECTED only for selection lists that were built with extended tables in PROGRAM entries. FRAME entry controls must use the _selected method. Because you can define extended tables only in SAS/AF software, you cannot use SELECTED in FSEDIT or FSVIEW programs.

In order for an extended table to be considered a selection list, you must specify a number of selections in the SETROW routine.


Example

Suppose the application displays a selection list that contains ten rows and that the user selects first row 3 and then row 5. If SELECTED is called with the value 2 specified for nval (as in the following statement), then the value returned in the variable ROW is 5, because row 5 was the second selection.

row=selected(2);


See Also

ISSEL

NSELECT

SELECT

SETROW

UNSELECT

Previous Page | Next Page | Top of Page