HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
584 AppendixE
Application Hints
Designing Your Forms File
Designing Your Forms File
The following hints may help you design your forms file with FORMSPEC:
1. If the status/window line is the last line on the screen, it should be no longer than 79
characters. This is because using the 80th character on the bottom line of the screen
causes the screen to roll up one line temporarily. If this roll-up is not a problem, then
the last line can use 80 characters.
2. On an HP 264X terminal, when a form is to be appended, column 80 of any line of the
form with an unprotected field should not be used. When the next form is displayed,
column 80 of the current form disappears.
3. If you want to enhance text (the protected area of the screen), you can define a field with
a display only field type and any enhancements you desire. Using the INIT processing
phase specification, text can be initialized to appear in the field. For example:
This method can also be used to alter "text" on the screen during execution. Define a
display only field with the desired enhancements. You can either use the processing
specifications phases (INIT, FIELD or FINISH) to alter the contents of the field or you
can programmatically change the field contents using VPUTBUFFER or VPUTFIELD
intrinsic calls.
NOTE
Processing specifications only execute if the application calls the "editing"
intrinsics: VINITFORM, VFIELDEDITS, VFINISHFORM.
4. If you want to define blank lines at the bottom of a form, define a display only field of at
least one character at the end of the blank lines. Delimit the field by
ESCAPE and
ESCAPE , with the field enhancements of NONE. This forces the display of seemingly
blank lines and does not affect the application programs. Otherwise FORMSPEC would
delete trailing blank lines from a form.
5. If you use save fields to accumulate totals and you expect the user to browse and correct
the fields used for summation, special care must be taken to ensure that the totals are
accurate. If an entered value is summed into a save field, and then this value is changed
in browse/modify mode, the new value is also summed into the save field unless you
specify the SET statement to account for this possibility.
For example, assume you are accumulating values entered in a field F1 into a save field
used for batch totals BT. In order to allow only the correct values to be accumulated,
construct a display-only field OLDF1 identical in its characteristics to F1. The field is
initialized to zero in collect mode only, but not in browse mode. In browse mode, OLDF1
contains the previous value of F1. This previous value is then subtracted from the sum