HP 3000 Manuals

USING SAVE FIELDS AND UNDERSTANDING PHASES [ 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

Chapter 6  USING SAVE FIELDS AND UNDERSTANDING PHASES 

Values entered on one form of a forms file can be transferred to another
form through the use of save fields, which are fields in the forms file
that are independent of any particular form.  As such, they can be used
to hold values for transfer between forms.  Save fields are defined on
the Save Field Menu.  This section will discuss the definition and use of
Save Fields.

Processing statements can be executed before, after, or while the form is
displayed.  These different times to execute processing statements are
called phases and are defined as initialization (before), field edits
(while), and finish (after) phases.  Phases, in general, are discussed in
this section, and use of the initialization phase is illustrated.

In the exercise in this section, you use three save fields to transfer
the order number, total net price, and the customer name from the ORDER
form to the TOTALS form.  In addition, through the use of phases, you
make the order number completely automatic by incrementing its value each
time the ORDER form is newly displayed.  Later, when the forms file is
compiled with these various changes, you use ENTRY to show how values are
incremented, transferred between forms, and saved even when ENTRY is
terminated and restarted.  The features covered in this section are:

Using FORMSPEC:                             Using ENTRY:

* Add and Modify Save Fields.               * Enter data for calculated values.
* Use Save Fields to assign values to fields* Review calculated values.
* Discuss phases in form processing.        * Terminate and resume data entry.
* Use the initialization phase.             * Modify data transferred between forms.
* Use Save Fields to pass values between forms.

[]
Figure 6-1. The Menu Sequence for Global and Save Field Menus As shown in Figure 6-1, there are two paths to the Save Field Menus. Remember, with either path, you must first reach the Main Menu by running FORMSPEC and requesting the forms file by name on the Forms File Menu. Once at the Main Menu, one path is to enter S in the selection box at the Main Menu and press ENTER. A Save Field Menu will be displayed (shown later in this section) on which you can define a new save field. You define or modify save fields in the same manner as you define or modify other field or form definitions. That is, you change those values you want to modify and then press ENTER to record the changes. The other path is a result of the fact that the Save Field Menus are positioned between the Globals Menu (discussed in Section 7) and the first Form Menu. This positioning off the main stream of form definition reflects the function of the Globals Menu and the Save Field Menus, which are used to define characteristics that are "global"--apply to the entire forms file. Being off the main stream means that you cannot go directly to an existing save field from the Main Menu as you can go directly to specific field or form definitions. Therefore, you use this other path when you want to examine your save field definitions or modify them. Specifically, you enter G in the selection box on the Main Menu and press ENTER to go to the Globals Menu (described in Section 7). Then press NEXT to display the first Save Field Menu. Thereafter, you use PREV or NEXT to display the defined Save Field Menus, if any. After displaying the first blank Save Field Menu following any defined save fields, NEXT causes the first Form Menu to be displayed.
[]
Figure 6-2. Main Menu


MPE/iX 5.0 Documentation