AUTOMATIC TERMINATION OF REPEATING FORM [ USING VPLUS/V AN INTRO. TO FORMS DESIGN Self-Paced Training Guide ] MPE/iX 5.0 Documentation
USING VPLUS/V AN INTRO. TO FORMS DESIGN Self-Paced Training Guide
AUTOMATIC TERMINATION OF REPEATING FORM
In the order just entered, the repeating form was terminated by pressing
NEXT FORM. It is also terminated automatically after seven lines have
been entered on a single order. This termination is solely a result of
how the forms file ORDFORM1 was designed. It could have been designed so
that the repeat stopped after 10 forms, after 30 forms, or by default,
only when NEXT FORM is pressed.
In any case, because of the forms file design, the final order form
ORDER_TOTALS is displayed automatically after the seventh order line is
entered.
Action
Enter the data shown in Figure 7-26 into the batch file.
When you press ENTER to record the seventh (and last) order line on the
screen, the screen is cleared automatically and the next form is
displayed.
Figure 7-27. The ORDER_TOTALS Form
When you press ENTER to record the last line of data for the repeating
form, the total for that line is calculated. Then the screen is cleared
and the next form is displayed. The accumulated totals for all the order
lines are summed into the net total and displayed on the last form of the
order, as shown in Figure 7-27.
Figure 7-28. Browse Mode, Record No. 13
Action
Press ENTER to have ENTRY calculate and record the remaining totals as
Record #13 of the batch file. Then press BROWSE and the record appears
as shown in Figure 7-28.
Modify Accumulated Values
Usually, modification of existing records is a simple matter--you locate
the record you want to change, make the change, and then press ENTER to
record it. If the corrected value affects a value in another record, you
locate that record and press ENTER to record the new value (as described
in Section 6). When totals are accumulated, making changes is more
involved, particularly if the summed values are entered on a repeating
form.
As the forms in ORDFORM1 are designed, you can change a value in the
repeating order line that affects the line totals and have this value
correctly summed into the net total field only if you make the change
before you press ENTER to record the totals. If you wait until the
totals have been entered in the last record of an order, the net total
will probably be incorrect. If you must change either the quantity or
unit price on an order line after the order totals are recorded, you
would then have to correct the net total value yourself. However, the
net total field on the totals form does not allow user entry. Thus, the
solution is to delete all the records in an order and then enter the
order correctly, as described later in this section.
Figure 7-29. Browse Mode, Record No. 1
MPE/iX 5.0 Documentation