4D v13PV ADD DYNAMIC FIELDS |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v13
PV ADD DYNAMIC FIELDS
PV ADD DYNAMIC FIELDS
The PV ADD DYNAMIC FIELDS command adds, in area, a block of rows corresponding to the values of fields defined by tables and fields for the current selection of the table defined by master, starting from the A1 cell. If dynamic columns have already been defined in area, the new block will be inserted starting from row 1 of the first available column. Values of fields can be modified directly from 4D View using the corresponding cells. The result is always vertically present (as columns as well as tables,fields and methods array elements). Note: If a dynamic arrays area was already inserted in the 4D View area using the PV ADD DYNAMIC ARRAYS command, it is deleted and replaced by the dynamic fields. For any column, the operation can concern an array related to a master table by a relation. The latter must be an automatic type and go from the master array to the array of the field to display. In the traditional example of invoices and invoice rows, you can recuperate and modify the content of a field of the rows array, but also of the invoice table compared to a selection from the invoice rows array (master table). Each callback method receives six parameters: $1: Area Note: If you intend to compile your database, you must declare these parameters, even if you do not use them all. $5 and $6: When the user scrolls the rows (records) in area, only new displayed rows are (re)drawn. $5 and $6 parameters allow you to know which rows are concerned. The developer should fill in the callback methods array. 4D View will then use that array to fill in the calculated column. There is no returned value ($0). PV ADD DYNAMIC FIELDS keeps a dynamic link with fields passed as parameters. As a result, modifications of values executed in the 4D View area are reflected in field(s) and vice-versa. Notes:
This example illustrates an enterable table included in an input form (with 4D View, this is rather easy). We will then modify fields in the contact table related to the current client, with their functions (linked table) and initials of each contact (calculated column). ARRAY INTEGER($TablesArray;4) `Table numbers The code for the CallMethod project method is as follows: C_LONGINT($1) `4D View area |
PROPERTIES
Product: 4D
INDEX HISTORY
Created: 4D View 6.8 SEE ALSO
PV ADD DYNAMIC ARRAYS |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||