This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.6
OB GET ARRAY
|
OB GET ARRAY ( object ; property ; array ) | ||||||||
Parameter | Type | Description | ||||||
object | Object, Object Field |
![]() |
Structured object | |||||
property | Text |
![]() |
Name of property to read | |||||
array | Text array, Real array, Boolean array, Object array, Pointer array, Longint array |
![]() |
Value array of property | |||||
The OB GET ARRAY command retrieves, in array, the array of values stored in the property of the language object designated by the object parameter.
object must have been defined using the C_OBJECT command or designate a 4D object field.
In the property parameter, pass the label of the property to be read. Note that the property parameter is case sensitive.
Given an object array defined in the example of the OB SET ARRAY command:
We want to retrieve these values:
ARRAY OBJECT($result;0)
OB GET ARRAY($Children;"Children";$result)
We want to change a value in the first element of the array:
// Change the value of "age":
ARRAY OBJECT($refs)
OB GET ARRAY($refEmployees;"__ENTITIES";$refs)
OB SET($refs{1};"age";25)
OB SET ARRAY
Type conversions between collections and 4D arrays
Product: 4D
Theme: Objects (Language)
Number:
1229
Created: 4D v14
Modified: 4D v15
4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)