HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Appendix E 585
Application Hints
Designing Your Forms File
BT. The following specifications are entered in the F1 Field Menu to ensure that only the
correct values are summed:
INIT
SET OLDF1 TO 0 \executed only in collect mode
FIELD
<any edit statements>
SET BT TO BT + F1 - OLDF1 \executed in browse or collect
mode
SET OLDF1
6. If you want to include a logical AND function in your processing specifications, use
nested IF statements. For example, to get the effect of
IF A=B AND C=D AND E=F
use the following statements:
IF A=B THEN
IF C=D THEN
IF E=F THEN
To negate an IF condition, simply use the ELSE part with a null THEN part.
A logical OR or NOR cannot be similarly specified, but for comparisons on a single field,
use IN or NIN with a list. For example, to get the effect of
IF A=B OR A=D OR A=F
use the edit statement:
AINB,D,F
7. Sometimes in data entry applications, the user would like to knowingly enter a value
that normally falls the designer's edits. This is called "Edit Override", and can be
implemented through FORMSPEC in a number of ways.
a. Adopt a user convention to require some special character(s) in the field along with
the desired data. (Note that the field must be made long enough to accommodate the
extra character(s).) For example:
IF MATCH ?*!! THEN \Skip the edits.
ELSE<edit statements> \No trailing “!”; apply normal edits
Note that the special characters must satisfy the default data type edit. The above
statement, for instance, would not work with a numeric field. Some possibilities of
special characters for numeric fields are leading zeros (MATCH O?*), a leading plus
(MATCH !+?*), or a comma (MATCH 000,?*). If signed numbers are expected, prefix
your pattern with !+,-.
b. Include an auxiliary EDIT OVERRIDE field that must be marked in order to bypass
edits. For example, assume a field named EO: