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 choices.
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. For instance, TA indicates subscripts (title,appid). Rows and columns apply to table controls only.
DataType A single letter (default is T) identifying the data stored in Variable at a subscripted node, one of: A (application identifiers), I (internal identifiers), T (titles).
The macro %%SetChoice is used to set the choices in a control that can present a list of alternatives. It uses an array of choices with the default structure Variable(Id)=Title. Choices can also be identified by application identifications (AIDs).
This is very frequently used to set choices in a control.
Previously set choices are not cleared by the macro %%SetChoice. To clear choices prior to setting them use the macro %%ResetChoice.
%%SetChoice(Drinks,DR,T,A)
Use local array DR(Title)=AID to
build the choices in the control called "Drinks".
Note that this will build an alphabetical list by title.