This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
OBJECT SET DATA SOURCE
|
OBJECT SET DATA SOURCE ( {* ;} object ; dataSource ) | ||||||||
Parameter | Type | Description | ||||||
* | Operator |
![]() |
If specified, object is an object name (string) If omitted, object is a field or variable | |||||
object | Form object |
![]() |
Object name (if * is specified) or Field or variable (if * is omitted) |
|||||
dataSource | Pointer |
![]() |
Pointer to new data source for object | |||||
The OBJECT SET DATA SOURCE command modifies the data source of the object(s) designated by the object and * parameters.
Passing the optional * parameter indicates that the object parameter is an object name (string). If you do not pass this parameter, it indicates that the object parameter is a field or variable. In this case, you pass a field or variable reference instead of a string (field or variable object only).
The data source is the field or variable whose value is represented by the object when the form is executed. In Design mode, the data source is defined in the Property list, usually through the Source and Source Field (fields) or Variable Name (variables) row:
Except for list boxes (see below), all data sources of the form can be modified by this command. It is up to the developer to ensure the consistency of the changes made.
In the case of list boxes, the following points must be considered:
If this command is applied to a data source that is not modifiable, it does nothing.
Modification of the data source for an entry area:
C_POINTER($ptrField)
$ptrField:=Field(3;2)
OBJECT SET DATA SOURCE(*;"Input";$ptrField)
Product: 4D
Theme: Objects (Forms)
Number:
1264
Created: 4D v14
4D Language Reference ( 4D v20 R7)