Using VPLUS: An Introduction to Forms Design (32209-90004)
6-10
Action
For a full discussion of this topic, read "Phases" in Section 4 of the
VPLUS/V Reference Manual
.
Table 6-3. Specifications to Initialize Order Number and Date
---------------------------------------------------------------------------------------------
-
||| |
| Form | Field | Processing Specifications |
||| |
---------------------------------------------------------------------------------------------
-
||| |
| ORDER | ORDNUM | INIT |
||| |
| | | SET ORDNUM TO SORD |
||| |
---------------------------------------------------------------------------------------------
-
||| |
| | ORDATE | INIT |
||| |
| | | SET ORDATE TO $TODAY |
||| |
---------------------------------------------------------------------------------------------
-
||| |
| TOTALS | ORDNUM | INIT |
||| |
| | | SET ORDNUM TO SORDNUM |
||| |
| | | IF SORDNUM GT 999999 THEN SET SORDNUM TO 100001 |
| | | ELSE SET SORDNUM TO SORDNUM + 1 |
||| |
---------------------------------------------------------------------------------------------
-
||| |
| | ORDATE | INIT |
||| |
| | | SET ORDATE TO $TODAY |
||| |
---------------------------------------------------------------------------------------------
-
USE PHASES
Once you have completed the actions described below, the specifications
for the ORDNUM and ORDATE fields in each of the two forms should appear
as shown in Table 6-3.
Action
In order to cause the order number on both the ORDER form and the TOTALS
form to appear when the forms are initially displayed, you return to the
ORDNUM fields for each of these forms and precede the processing
statements by the header, INIT. Press ENTER to record the changes.
As a result, the order number is calculated in the save field and then
moved to the ORDNUM field before either form is displayed. It is also
useful to display the date when a form is displayed.
Action
This can be accomplished in the ORDATE fields of each form by entering