HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
88 Chapter3
INTRODUCTION TO FORMS DESIGN
FORM FAMILIES
which you wish to generate the child form. You may change any of the other Form Menu
fields. Press
ENTER.
3. The layout for the form you named in step 2 is displayed. Then press
NEXT. Since the
form layout must be the same for parent and children, pressing
ENTER causes the error
message "Cannot change screen, the form is a family member." to appear in the window.
4. You may change any of the attributes or processing specifications on the Field Menus
(except length and field number) to adjust the internal characteristics of the child form
to your needs. A child form continues to have all the characteristics of the parent if you
do not modify the child's Field Menus.
To modify the form layout of a form family, you need to change only the layout of the parent
form, and recompile the forms file. This changes the layouts of the child forms
automatically. Deleting the parent form deletes the entire form family.
Careful naming of forms and the use of the optional comment field of the Form Menu
makes relationships between forms of the same family more apparent. To make it easier to
distinguish between forms of the same family in ENTRY or in other applications, you may
wish to add a field reserved for the form name to the screen definition of the parent form,
and add processing specifications which set the value of that field to the name of the
current form. Refer to the SET command in Section 4.
Although family relationships are not maintained after a copy operation, they can be
re-established using the
R option "Relate child form to parent form" at the Main Menu. In
order to use this method of creating family relationships, certain criteria must be met. The
forms must already exist and their form layouts must be identical. The forms must have
identical field number sequences. The forms must be distinct forms; that is, one form
cannot be both the parent form and the child form. Furthermore, the child form cannot
already be a child form or a parent form. Thus, it is also possible to relate forms which
were never previously related.
Users should note that if a new form is to be reproduced from a form which is already a
child, then its parent will be designated as the actual parent. For example, suppose that an
existing forms file contains three forms named PARENT, CHILD and NEWCHILD, where
PARENT and CHILD already maintain a relationship. At the Main Menu, it is indicated that
NEWCHILD should become a child form of CHILD. If the forms meet the above criteria,
FORMSPEC actually creates the relationship with PARENT as the parent form and
NEWCHILD as its child. The form named CHILD continues to be a child form of PARENT.
Forms can also be related using the RELATE command from FORMSPEC in batch mode.
(For further information see "Using FORMSPEC in Batch Mode", Section 7.)
Form Family Example
Suppose you have a VPLUS application which, after accepting a customer's identification
number, retrieves items of pertinent customer information from a data base and displays
them on a form. It would be convenient to have two forms, one on which the customer ID is
required, and the other on which the user views or alters the customer data. If you don't
use the form family feature, the user who is alternating between entering customer ID's
and inspecting or modifying data constantly has to wait for the form to be repainted each
time the user needs information on another customer.