SPECIFY FIELD EDITS [ 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
SPECIFY FIELD EDITS
When you press ENTER to record the field type specification on the Field
Menu for ORDNUM, FORMSPEC issues the next sequential Field Menu, which is
the one for ORDATE. The menu for the ORDATE field also has only default
specifications.
Action
Change the field type to R for required and change the data type to MDY.
When a date is specified as MDY, this means the user must enter a valid
date in the order: Month Day Year.
Action
Press ENTER to record the changed field attributes.
FORMSPEC issues the Field Menu for NAME, as shown in Figure 3-9.
Action
Let's keep the default values for the name, address, and phone number
fields, meaning they are all to be optional and, if specified, to have
any characters. To do this, just skip these fields by pressing NEXT at
each menu until the Field Menu for QTY is issued.
Figure 3-10. The Field Menu for the Quantity Field
The QTY field is the first field in the line of order information, as
shown in Figure 3-10. This field should always be specified by the user
and the quantity should be entered as a number. To insure that an
unsigned number, consisting only of the digits 0-9, is entered in this
field, use the data type DIG.
Action
Change the field type to R for required and change the data type to DIG.
Press ENTER to record the changes.
Figure 3-11. The Field Menu for the Part Number Field
Figure 3-12. The Field Menu for the Description Field
Action
Change the Field Menu for PARTNUM to a required field, as shown in Figure
3-11. Press ENTER to record the change.
This means that the user must enter a part number.
Action
When the Field Menu for DESCRIPTION is displayed, as shown in Figure
3-12, press NEXT.
This keeps the defaults, which specify that the field is optional and
able to accept any characters. Pressing NEXT rather than ENTER on Field
Menus that do not require any changes is a good habit to build. This
keeps the forms file size to a minimum.
Figure 3-13. The Field Menu for the Unit Price Field
Figure 3-14. The Field Menu for the Total Price Field
The next two fields are UPRICE, as shown in Figure 3-13, and TPRICE, as
shown in Figure 3-14. The user needs to enter prices into these fields.
Action
Change the field type of each field to R for required and change the data
type of each field to NUM2. Press ENTER for each Field Menu to record
these changes.
These are all the changes to be made in this section.
Action
Press MAIN/RESUME to return to the Main Menu.
Figure 3-15. The Main Menu
Action
Type X in the selection box, as shown in Figure 3-15. Press ENTER to
compile ORDFORM1. When the compile is complete, press EXIT to exit
FORMSPEC.
At this point, the forms file ORDFORM1 with the new ORDER form is
compiled and can be used for order entry through ENTRY. The fields are
edited as shown in Table 3-8. The next step is use ENTRY to enter data
into a batch file using the new form.
Table 3-8. Summary of the Fields and Their Edits
-----------------------------------------------------------------------------------------------------
| | |
| FIELD | EDITS SPECIFIED |
| | |
-----------------------------------------------------------------------------------------------------
| | | | | |
| Num | Name | FType | DType | Initial Value |
| | | | | |
| 8 | ORDNUM | R | CHAR | 100000 |
| | | | | |
| 1 | ORDATE | R | MDY | |
| | | | | |
| 2 | NAME | O | CHAR | |
| | | | | |
| 3 | ADDRESS | O | CHAR | |
| | | | | |
| 4 | CITY | O | CHAR | |
| | | | | |
| 5 | ST | O | CHAR | |
| | | | | |
| 6 | ZIP | O | CHAR | |
| | | | | |
| 7 | PHONE | O | CHAR | |
| | | | | |
| 9 | QTY | R | DIG | |
| | | | | |
| 10 | PARTNUM | R | CHAR | |
| | | | | |
| 11 | DESCRIPTION | O | CHAR | |
| | | | | |
| 12 | UPRICE | R | NUM2 | |
| | | | | |
| 13 | TPRICE | R | NUM2 | |
| | | | | |
-----------------------------------------------------------------------------------------------------
_________________________________________________________________
| |
| :RUN ENTRY.PUB.SYS |
| |
| HP32209v.uu.ff ENTRY (C) HEWLETT-PACKARD CO. 1986 |
| |
| ENTER FORMS FILE NAME AND PRESS RETURN: ORDFORM1 |
| ENTER BATCH FILE NAME AND PRESS RETURN: ORDATA |
_________________________________________________________________
Figure 3-16. Run ENTRY and the ORDER Form, Batch Record No. 1
MPE/iX 5.0 Documentation