ADD SAVE FIELDS [ 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
ADD SAVE FIELDS
Since save fields do not belong to any particular form, they can be used
to transfer data between one form and another. In the case of the forms
file, ORDFORM1, you want to transfer the order number, the net total, and
the customer name from the ORDER form to the TOTALS form. For this
purpose you need three save fields, one for each value to be transferred.
Action
To display this menu, run FORMSPEC and request the forms file ORDFORM1 on
the Forms File Menu. As shown in Figure 6-2, when the Main Menu is
displayed, enter S in the selection box and press ENTER.
Figure 6-3. Save Field for SORDNUM
This selection causes a blank Save Field Menu to be displayed (not
shown).
Action
Enter the name (SORDNUM), length (6), and data type (DIG) , and initial
value of 100001 to define the save field, as shown in Figure 6-3. Press
ENTER.
You should always specify an initial value for fields of type DIG,
NUM[n], or IMPn. Character fields default to spaces. You have now
defined a save field for calculating and transferring order numbers; it
is called SORDNUM and has an initial value of 100001 for the first order
number. When you press ENTER to record the first save field, a new blank
Save Field Menu is displayed.
Action
Using the same method, define the next two save fields, SNAME and
STOTNET. Refer to Table 6-1 for a list of the characteristics for the
three save fields.
Table 6-1. Save Field Definitions for ORDFORM1
--------------------------------------------------------------------------------------------------
| | | | |
| Save Field Name | Length | Data Type | Initial Value |
| | | | |
--------------------------------------------------------------------------------------------------
| | | | |
| SORDNUM | 6 | DIG | 100001 |
| | | | |
| SNAME | 42 | CHAR | -- |
| | | | |
| STOTNET | 10 | NUM2 | 0.00 |
| | | | |
--------------------------------------------------------------------------------------------------
Figure 6-4. Main Menu
MPE/iX 5.0 Documentation