Using VPLUS: An Introduction to Forms Design (32209-90004)

7-21
Figure 7-17. The Field Menu for QTY
Since QTY is the first field in ORDER_LINE, you use that field to
increment the LINE_COUNT save field and conditionally terminate the
repeat.
Action
Return to the Main Menu and use option G--to go to the QTY field of
ORDER_LINE, where you specify the statements to increment the LINE_COUNT
save field, as shown in Figure 7-17.
Note that the existing edit statement must be preceded by a FIELD heading
so that it is not executed in the initialization phase. Since the other
statements are executed in the initialization phase, they are performed
before the form is displayed on the screen. Now you need to give
LINE_COUNT an initial value because it must be initialized each time a
new order transaction is started.
Action
Return to the Main Menu and use option G--to go to the ORDNUM field of
ORDER_HEAD, where you specify the statements: INIT and SET LINE_COUNT
TO 0.
These statements initialize the LINE_COUNT save field to zero. The
counter can be incremented in any field in ORDER_LINE, but it must be
incremented in the initialization phase so that the count is not affect-