version 6.0 (Modified)
SET CHOICE LIST ({*; }object; list)
| Parameter | Type | Description | |
| * | If specified, object is an Object Name (String) | ||
| If omitted, object is a Field or a Variable | |||
| object | Form Object | Object Name (if * is specified), or | |
| Field or Variable (if * is omitted) | |||
| list | String | Name of the list to use as Choice list | |
| (as defined in Design environment) |
Description
The command SET CHOICE LIST sets the choice list for the objects specified by object to the hierarchical list (defined in the Design environment List Editor) whose name you pass in list.
This command can be applied in an input or dialog form, to fields and enterable variables whose value can be entered as text. The list is displayed during data entry when the user selects the text area.
If you specify the optional * parameter, you indicate an object name (a string) in object. If you omit the optional * parameter, you indicate a field or a variable in object. In this case, you specify a field or variable reference (field or variable objects only) instead of a string. For more information about object names, see the section Object Properties.
Note: This command cannot be used with fields located in a subform's list form.
Example
The following example sets a choice list for a shipping field. If the shipping is overnight, then the choice list is set to shippers who can ship overnight. Otherwise, it is set to the standard shippers:
If ([Shipments]Overnight) SET CHOICE LIST([Shipments]Shipper; "Fast Shippers") Else SET CHOICE LIST([Shipments]Shipper; "Normal Shippers") End if