4 Interaction between Programs and Forms
Form Link Information
The linking information stored with the form consists of:
- The number and location of input and output fields.
- The order in which the input and output fields are accessed by the program.
The program that uses the form must be written so that the program-link is complete. The program must read or write the correct number of input or output fields in the correct order. If not, incorrect results will occur.
For example, assume the program uses the following form:
CUSTOMER NAME
PART NUMBER
PRICE ____________
QUANTITY
SUB TOTAL ____________
TAX ____________
SHIPPING CHARGE ____________
TOTAL ____________
The user fills in the inverse video fields and the program fills in the underlined fields. Suppose the input order was 1) CUSTOMER NAME 2) PART NUMBER 3) QUANTITY. Further assume that the program was written to use the input fields in the following order: 1) CUSTOMER NAME 2) QUANTITY 3)PART NUMBER. You can see the problems that would result. Wrong parts would be shipped, and the total charges would be wrong.
When you are writing a program that uses a form, but do not know the input and output order of the fields, do the following:
- Run CFORM.
- Press CREATE FROM FORM.
- Type in the name of the form the program will use.
- Press INPUT ORDER, which will display the order of input.
- Take note of the input order.
- Press EXIT.
- Press OUTPUT ORDER which will display the order of output.
- Take note of the output order.
- Press EXIT.
- Terminate CFORM by pressing EXIT PROGRAM.
Do not alter the form and do not store it. While the form is displayed, you should also note the length of each field.
Eloquence Forms Manual - 19 DEC 2002