Chapter Contents |
Previous |
Next |
SHOWLIST |
Category: | Selection List |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
selection=SHOWLIST(item-1<, . . . ,item-13>,message); |
Type: Character
Type: Character
''
) to specify the default message, which instructs
users to make one selection.
Type: Character
Details |
SHOWLIST automatically displays a custom selection list and returns the user's selections. Only one user selection is allowed, and the selection list window closes automatically after the user makes a selection.
You can provide a default or initial selected value in the list by assigning a value to selection before executing SHOWLIST. If selection contains a value that corresponds to one of the item arguments when SHOWLIST executes, then that selection is designated as selected when the selection list is displayed.
If a user closes the selection list window without making a selection, SHOWLIST returns a blank value unless there was an initial value for selection before SHOWLIST was called.
Example |
Open a selection list window that displays a list of three colors:
color='BLUE'; color=showlist ('RED','BLUE','GREEN','Please select a color.');
Because a value is assigned to the variable COLOR before
SHOWLIST executes, and the value BLUE
is one
of the arguments for SHOWLIST, the item BLUE in the list is highlighted with
an asterisk when the list is
displayed.
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.