5 Controlling Forms

The LOAD FORM Statement

The LOAD FORM statement is only available in the development version of Eloquence. This statement displays a form on the screen and loads information into memory about the fields of the form (for example, length, type, and location). Syntax is as follows:

LOAD FORM "form name [volume spec]", array

Replace form name with the name of the form. The volume spec parameter is optional. If used, replace it with the volume label or unit specifier. Replace array with an integer array name. This array contains information about the fields of the form. The minimum array size (number of elements in the array) is equal to 7 + 2 $\ast$ number of input fields + number of output fields. So, if you have 50 input fields and 70 output fields, the array associated with the form must allow for at least 177 elements.

LOAD FORM is useful for automatic forms generation or modification. For example, suppose you have a database that contains a record named CUSTOMER NUMBER, and it has a field length of 16. Suppose you change the database schema text file so this field is 20 characters long. The screens that contain the CUSTOMER NUMBER record must be changed. This can be done using a program containing the LOAD FORM and STORE FORM statements. The general flow of the program would be (1) LOAD FORM, (2) search for CUSTOMER NUMBER, (3) change field length to 20, (4) STORE FORM.

Error Messages

Listed below are the error numbers that could occur when the LOAD FORM statement is executed. Next to each number is an explanation.

ERROR 56 - File or directory not found or no read permission.

ERROR 861 - Improper number of elements. The array does not have enough elements to hold the data from the LOAD FORM statement.

ERROR 862 - Improper array type. The array specified must be an integer array.


Eloquence Forms Manual - 19 DEC 2002