Skip to main content
Version: Next

OB GET ARRAY

OB GET ARRAY ( object : Object ; property : Text ; array : Array )

ParameterTypeDescription
objectObject→Structured object
propertyText→Name of property to read
arrayArray←Value array of property
History
ReleaseChanges
15Modified
14Created

Description​

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.can be an object variable or 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.

Example 1​

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)

Example 2​

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)

See also​

OB SET ARRAY
Type conversions between collections and 4D arrays

Properties​

Command number1229
Thread safeyes