4D View v14PV ADD DYNAMIC ARRAYS |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v14
PV ADD DYNAMIC ARRAYS
|
PV ADD DYNAMIC ARRAYS ( area ; array ) | ||||||||
Parameter | Type | Description | ||||||
area | Longint |
![]() |
4D View area | |||||
array | String array |
![]() |
Array containing names of array | |||||
The PV ADD DYNAMIC ARRAYS command adds in area a block of rows corresponding to the values of arrays whose names are passed using the array parameter, starting from the cell A1.
The arrays must all contain the same number of elements and are always presented vertically (as columns). The first array is displayed in the column A, the others in columns located to its right.
Note: If a dynamic field area was already inserted in the 4D View area using the PV ADD DYNAMIC FIELDS command, it is deleted and replaced by the dynamic arrays.
PV ADD DYNAMIC ARRAYS maintains a dynamic link with the arrays attached the dynamic portion of the area. As a result, modifications of values assigned in a 4D View area will be reflected within each array and vice versa. Deleting or adding elements in the 4D array will also be reflected within the area.
You cannot set several dynamic portions in the same 4D View area.
Notes:
The following example get the names of contacts related to the current record of the clients table in an array, then displays the content in a 4D View area included in the input form of the client being modified.
Modifications executed by the user will be directly reflected in the 4D arrays, that we will have to next manage, for example, by updating the selection of recorded contacts.
ARRAY TEXT(NamesArray;0) `Contact names array
ARRAY TEXT(FirstnamesArray;0) `Contact first names array
ARRAY STRING(31;$ArrayArrays;2) `Arrays name array
$ArrayArrays{1}:="NamesArray" ` First dynamic column
$ArrayArrays{2}:="FirstnamesArray" ` Second dynamic column
RELATE MANY([Clients]Code) `Get linked contacts
SELECTION TO ARRAY([Contacts]ContactName;NamesArray;[Contacts]ContactFirstname;FirstnamesArray)
PV ADD DYNAMIC ARRAYS(Area;$ArrayArrays)
Product: 4D View
Theme: PV Cell value
Number:
15902
Created: 4D View 6.8
PV ADD DYNAMIC FIELDS
PV CLEAR DYNAMIC COLUMNS
PV SET CELL VARIABLE
4D View Language ( 4D View v11.4)
4D View Language ( 4D View v12)
4D View Language ( 4D v13)
4D View Language ( 4D View v14 R2)
4D View Language ( 4D View v14)
4D View Language ( 4D View v14 R3)
4D View Language ( 4D View v14 R4)