For each local or non-matching remote view you have created or added to the Data Builder, you can and should create index tag definitions. You need certain required index tag definitions for views to make Related Forms, One-to-Many forms and Related Pages forms based on views work. You can also create index tag definitions for the Toolbar Order control.
We use the term “index tag definition” because what VPME needs in many cases is just the definition. An actual index on the tag definition may never be required. It depends on the functionality that’s needed. When view indexes are needed, VPM Enterprise creates them on the fly.
Tip: See Required Indexes for Views to learn what index tag definitions VPM Enterprise requires you to define. See Index Tags and Toolbar Order Control to learn more about the Tags Edit page and how to set up the Toolbar Order control.
Use the Tags Edit page to create or modify index tag definitions for views.
Ø To create a new index tag definition for a view
1. Select View: Select the view on the Data Builder List page.
2. Tags: Expand the view entry in the Data Builder List and select the Tags node at the bottom of the expanded List. Click the New button. VPM Enterprise displays the Index Tags Edit page.
The List page lets you see and select from a list of index tags for a view. The Tags Edit page lets you navigate through, create and maintain index tag information for the selected view. The Tag list box at the top of the Edit page lets you select from the Tag definitions that have already been created for the view. When you close the Edit page by closing the Data Builder or returning to the List page, the entries you made on the Edit page are saved.
3. Tag Name: Enter a name for the index tag you are defining in the Tag Name box. You can enter up to 10 characters.
4. Description: Enter a description for the index tag definition in the Description box. You can enter up to 100 characters. The Description you enter is displayed in the Toolbar Order control when the view is the InitialSelectedAlias on a form you create from the VPME form classes.
5. Comments: Enter any comments you want about the index tag that you are defining.
6. Index Expr: Click the Index Expr button to use the Visual FoxPro Expression Builder to create the index expression. Follow the Visual FoxPro rules for creating index tag expressions.
7. For Expression: If the index tag definition requires a For expression, click the For Expr button to use the Visual FoxPro Expression Builder to create the For expression.
8. Descending: Check the Descending check box if you want to have the index created in descending order whenever it is used in your application.
9. VPM Primary: Check the VPM Primary check box if the index tag is the primary key for the view.
10. Create in Form: Check the Create in Form check box if you want the index tag to be created by the Load event (through the CreateTagsInForm method) of a form that has the selected view in its Data Environment. If not checked, the index tag will be created by VPM Enterprise as needed.
Tip: If you check the Create in Form check box for a view’s index tag definitions, you can easily bypass the creation of the view’s index tags on a particular form. To bypass the creation of the view’s index tags in the Load event of a form, add the view’s alias to the comma-delimited list of aliases stored in the form property cDoNotCreateTagsInForm_Aliases.
11. Include in Order dialog: Check the Include in Order dialog check box if you want to include the index tag definition in the Toolbar Order control when a form that displays the view is run. Including the index tag definition in the list of index tags displayed by the Toolbar Order control will let users select the index tag definition’s order when a form that displays the view is run.
12. Include in Order dialog when active form is a Related Forms child form: Check this check box if you want to include the index tag definition in the Toolbar Order control when the form that displays the view is related to a parent form already on the desktop. See “Child View Indexes Used in Toolbar Order Control” in the “Required Indexes for Views – Child View Indexes” section below to better understand the requirements for child view indexes.
13. Return to List: When you have finished entering the index tag definition, click the List page to save the definition and to return to the List page from which you can create another index tag for the view.