Required Indexes for Views

For each local or non-matching remote view you create or add to the Data Builder, you must create the following index tag definitions if you plan to use the view for Related Forms, a One-to-Many Form or a Related Pages form. See the Related Forms chapter for a complete description of VPM Enterprise’s Related Forms feature. See the Creating Forms: The Builders chapter for descriptions of the VPME One-to-Many and Related Pages forms.

1. Primary Key Index:

Create an index tag definition for a view’s primary key field(s). Make sure that you check the VPM Primary check box on the primary key’s index tag Edit page.

Tip – Generating Surrogate Primary Keys: VPME can automatically generate surrogate primary keys for a view. See Generating Surrogate Primary Keys to learn how and when you can generate surrogate primary keys for a view.

2. Child View / Foreign Key Indexes: 

Child view indexes require special construction. If you’re not familiar with the term “child view”, see What Is a Parent? What is a Child?.

·       Foreign Key Tag: For every child view, create an index for the foreign key that links child records to the primary key in the child’s parent table, view or CursorAdapter. 

Important: The foreign key tag expression must not contain any other fields but the foreign key fields. You will need the foreign key tag when you set up Referential Validation for a foreign key. See Referential Validation.

·       Child View Indexes Used in Toolbar Order Control: The VPM Enterprise Form Toolbar provides an Order control (see Order) that lets users change the order of the records displayed on a form. The Order control lets users change the record order by selecting from a list of indexes that you choose to display on the Order dialog. See Index Tags and Toolbar Order Control to learn how to choose indexes for the Order dialog.




Setting View Properties