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

5-13
Figure 5-10. Field Menu for DISCNT_PERCNT in the TOTALS Form
When you press ENTER at the Field Menu for ORDATE, the next Field Menu
displayed is for the TOTNET field, which contains the total net price of
the current order. This field is entered by the user; it should equal
the total order price of the TPRICE field, which was calculated on the
previous form, ORDER. Note that this field must be numeric since it is
used in later calculations.
Action
At the Field Menu for TOTNET, as shown in Figure 5-9, change the field
type to R for required, and the data type to NUM2. Press ENTER.
When you press ENTER, the next Field Menu is displayed, which describes
the discount percentage field DP.
Action
At the Field Menu for DP, as shown in Figure 5-10, change the field name
to DISCNT_PERCNT (a more descriptive name than DP); leave the field type
as 0 for optional; change the data type to NUM0; and assign an initial
value of 10 for a discount of 10 percent. Press ENTER.
In the next section, you learn how to transfer values between forms using
Save Fields. This technique allows the order number, the total net
price, and the customer name to be transferred from the ORDER form to the
TOTALS form.