MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%SetSel ( Object , Variable [ , SubscriptType ] )

Set the selections value of the property of a control.

Object The control whose choices are to be set. Default is the current control. The control should be a type that can take a list of choices (a list, radio button or table).

Variable The name of the variable containing the selections.

SubscriptType A single letter (default is I) identifying the contents of the subscripts in Variable, one of: A (application identifiers), I (internal identifiers), T (titles), R (rows), C (columns). Multiple letters indicate multiple subscripts. Rows and columns apply to table components only.

The macro %%SetSel causes the current selections in a control to be set from the list of already-set choices. It is primarily useful to set the default selections in a control.

Pre-existing selections are not first cleared; to do this use %%ResetSel.

Since the selections must be made from pre-existing choices, only a single subscript is supported. However, that subscript need not be an internal identifier.

Note that the definition of the control must permit the number of selections presented.

Example

%%SetSel(Drinks,DEFAULTS,T)
Set the value of the control called "Drinks" to the title-values contained in local array DEFAULTS().

See also

%%Get, %%GetChoice, %%GetSel, %%Prop, %%Reset, %%ResetChoice, %%ResetSel/a>, %%Set and %%SetChoice.