Multiple pages (Forms) in ObjectVision:

MULTIPG.OVD is a sample application that accompanies this document.

When completing a form in ObjectVision the fields are answered in
order of their position on the form, unless there is a tree which
requires data from another field before it can be calculated.
When that happens, the cursor will jump to the field required to
collect the necessary data before it resumes its original order.
If that field is on a second form, the second form is brought
forward to collect the data required.

This work around is straight forward, but may be considered time
consuming for some developers.  For them, the easiest way to deal
with the problem is to instruct the user to manually select the
necessary field or form using the mouse for the field, or the
menu Form | Select for the form.   Those who wish to automate
that step will need to build the tree described in this document.

The following example shows how a decision tree can force a
second form to become active for data entry:

A simple example of a multipage application uses two forms, each
with three fields and one tree.  Form1 has fields A1, A2 and
Signed:,  Form2 has fields B1, B2 and B3.  The fields are listed
in the order described.  Signed: has a decision tree which checks
the status of each field on the second form.  The Signed: field's
sole purpose is to launch the second form.

The tree begins with a branch on the B1 Field.  This branch has
one conclusion, and one branch.  The condition of the first
conclusion is if B1 ="", then +B1, in other words, go see if the
first  field on the second page is blank, if it is ask the user
to fill in the answer -- this will require bringing the second
form to the top and making it the active goal form.  The branch
below this (which is traversed if B1 is not equal to "", or
blank) sets up the same way to deal with B2 being either blank or
not blank, if it is not blank, check B3.  If B3 is not blank then
return some message to the Signed: field, like the user's name or
initials.

The reason it is important to account for all fields on the
second form is to keep from having the cursor return to the
original form before the user has added all data to the second
form.

Branch on b1
If =""
    Then +b1
If Otherwise
    Branch on b2
        If =""
            Then +b2
        If Otherwise
            Branch on b3
                If =""
                    Then +b3
                If Otherwise
                    Then Sign off message

The sign off message would only appear once each field on the
second form was answered.  There are many variations of the above
which will activate a second form.  This happens to be one of the
simplest ways to have the second form become the active form.

















































                              - 2 -
