HPlogo HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 INTRODUCTION TO FORMS DESIGN

FORM FAMILIES

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

A family of forms is a collection of forms that share a common form layout but may have different field attributes, processing specifications, or form sequencing options. Use of form families may improve VPLUS performance in some transaction processing applications; since only the internal form characteristics are different among members of a family, you do not have to wait for VPLUS to repaint the screen when you change to another form in the same family. Note that the security attribute is not updated when changing from one form in a family to another in the same family. Figure 3-14. illustrates some form family concepts.

Figure 3-14 Form Family Relationship

Form Family Relationship
Parent Form

Also called father or root form. A parent form is a standard VPLUS form created in FORMSPEC either by designing it or by copying it from another form. The form layout of the parent form determines the layout of all child forms that are reproduced from it. Changing the layout of the parent form causes the layouts of the child forms to change.

Child Form

Reproduced from the parent form, the form layout of the child form may not be modified. You may change form sequencing options, field attributes and processing specifications. As Figure 3-14 “Form Family Relationship” indicates, you may reproduce a child form from another child form, although VPLUS still considers the original root form to be the parent of both forms.

Reproduce

Generate a related form by entering the name of an existing form in the "Reproduced from" field of the Form Menu.

Creating Child Forms

You create child forms by following these steps:

  1. Select A for "Add a form" at the Main Menu. Press ENTER.

  2. When the Form Menu comes onto the screen, specify the name of the child form you wish to create, and, in the "Reproduced from" field, specify the name of the form from 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.

The solution to this problem of long user waiting time is to create two forms with the same form layout but different field attributes.

Suppose the root or parent form of this example is named CUSTPAR, and that its form layout is as shown in Figure 3-15 “Parent Form” below. All of the fields in this form are display only, except for the Customer ID Number field, which is required.

Figure 3-15 Parent Form

Parent Form

Create a child form, CUSTCHILD, by specifying CUSTPAR in the "Reproduced from" field of the Form Menu. Press NEXT until the Field Menu for CUSTID appears and make it a display only field. Make all other data fields in the form optional. Compile the forms file.

Figure 3-16 Child Form

Child Form

Now when the user types the customer ID and presses ENTER, the application retrieves the related information from the database and displays it in the form immediately. Once the form is on the screen, it appears to remain there as long as the user uses the application, rather than being repainted each time for every customer about whom the user calls up data.

Feedback to webmaster