An INPUT ARRAY statement must contain the Binding clause which correlates the program array with the screen array. It temporary binds them to enable the data manipulation.
|
Program array |
The name of a variable of ARRAY or DYNAMIC ARRAY data type which will store values supplied during the input |
|
Screen array |
The name of the screen array where the input will be performed |
FROM clause, which is required and cannot be omitted, associates the screen array with the program array. There can be other fields in the form which are not included into the screen record.
The fields in each row of a screen array and members in each record of the program array should match in number, order and be of the same or compatible data types. The entered data are validated against the data type of the record members of the program array but not against the data types of the fields.
The variables used as record members of a program array can be of any data type. However, a variable declared LIKE a database column of SERIAL data type is skipped while performing input.
The number of the records in the program array determines how many program records the array can store. The number of records within the screen array specifies the number of rows that can be displayed by the form at a time. If the size of the program array greater than the size of the screen array, use the Next page and Previous page keys to see the records that do not fit into the displayed screen record.
By default, the cursor moves over the screen array in the order defined by the program array declaration. At the beginning of the input the cursor is located at the first screen array of the screen record.
If the WITHOUT DEFAULTS keywords are present in the INPUT ARRAY statement:
To display the previously initialized values do the following:
INITIALIZE variables
Call the built in function set_count() to determine the number of rows that are stored in the program array
Use the INPUT ARRAY with the WITHOUT DEFAULTS keywords
When the INPUT ARRAY statement contains the WITHOUT DEFAULTS keywords, the user sees the current values of the variables or values of the table columns in the current row and it is possible to change these values by entering other values to the form fields. The built-in function field_touched() can help to validate which fields have been changed and thus to define which columns in a table require update.