MSM-Workstation
Macros

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

%%GetChoice ( Object , Variable [ , SubscriptType [ , DataType ] ] )

Get the choices that are available using a control such as a list, radio gadget, or table.

Object The control whose choice information is to be fetched. Default is the current control. The control should be a type that has a list of choices (a list type, radio button, or table).

Variable The name of the variable that will receive choices.

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

DataType A single letter identifying the data stored in Variable at a subscripted node, one of: A, I, T (as above) or N (empty string). Default is T.

The macro %%GetChoice generates code that retrieves the list of possible choices for a component of a window, and stores the values in this list into an array (parameter Variable). Since the definition of the possible choices is typically established by the programmer, either explicitly in the definition of the component, or under program control when the control is created or manipulated, it is hardly ever necessary to use this macro.

Example

%%GetChoice(Drinks,DR,TA)
Get the choices for control named "Drinks" and place it in local array DR(Text,AppId)="".

See also

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