|
|
HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 INTRODUCTION TO FORMS DESIGN FORM FAMILIES |
|
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.
You create child forms by following these steps:
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.) 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. 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. 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. |
|