4D v16.3OBJECT SET LIST BY NAME |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
OBJECT SET LIST BY NAME
OBJECT SET LIST BY NAME
The OBJECT SET LIST BY NAME command sets, replaces or disassociates the list associated with the object or group of objects specified by object. The list whose name is passed in the list parameter must have been created using the List Editor in the Design environment. This command can be applied in an input or dialog form, to fields and enterable variables whose value can be entered as text. 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. Note: This command cannot be used with fields located in a subform’s list form. The OBJECT SET LIST BY NAME command now allows you to set or replace all the types of lists associated with the object(s) designated by the object and * parameters: choice lists, list of required values, and lists of excluded values. To do this, in the listType parameter you pass one of the following constants, found in the "Form Objects (Properties)" theme:
If you omit this parameter, value 0 (Choice list) is used by default. In the current process, to disassociate a list that was associated with the object, pass an empty string ("") in the list parameter for the type of list concerned. 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) Associate the "color_choice" list as a simple pop-up/drop-down list named "DoorColor": OBJECT SET LIST BY NAME(*;"DoorColor";Choice list;"color_choice") You want to associate the "color_choice" list with the "WallColor" combo box. Since this combo box is enterable, you want for it not to be possible to use certain colors such as "black", "purple" etc. These colors are placed in the "excl_colors" list: OBJECT SET LIST BY NAME(*;"WallColor";Choice list;"color_choice") You want to remove the list associations: // removal of a choice list
See also
|
PROPERTIES
Product: 4D
HISTORY
Modified: 4D v6 ARTICLE USAGE
4D Language Reference ( 4D v16) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||