Related Pages Properties and Characteristics

The properties and characteristics of Related Pages forms include:

·       Basic Page or Editable Grid: A page on a Related Pages form must be either a basic form type of page or an editable grid form type of page. A page cannot contain another pageframe. A page can contain a List Grid (see ProMatrix List Grid Builder) only for the InitialSelectedAlias table, view or CursorAdapter.

·       Relationship to Toolbar: Each page on a Related Pages form interfaces with the Toolbar just as if the page were a form. A page can contain on-form Toolbar controls.

·       One Set of Related Tables: You can have only one set of related tables, views and CursorAdapters per pageframe. A set of related tables, views and CursorAdapters is a group of related tables, views and CursorAdapters with one parent table, view or CursorAdapter, child tables, views and CursorAdapters, grandchild tables, views and CursorAdapters, etc. There is no theoretical limit to the depth of the set of related tables. However, there is a practical limit based on the fact that the more pages and controls included in the pageframe, the slower the speed of activating the form.

·       One Edited Table or View Per Page: You cannot edit more than one table, view or CursorAdapter per page. You can, however, display fields from more than one table, view or CursorAdapter per page.

·       Topmost Parent: Parent-child terminology can get confusing because a child of one parent table, view or CursorAdapter can itself be the parent of another table, view or CursorAdapter. For that reason, we coined the term “Topmost Parent” to refer to the highest level parent of a set of related tables. The Topmost Parent is the table, view or CursorAdapter you select for a Related Pages form’s Data Environment InitialSelectedAlias property.

·       Record Positioning: Related Pages operate much like Related Forms with respect to record positioning. See Record Positioning.

·       Referential Validation: VPM Enterprise Referential Validation with a Parent RI Cursor entered must be set up among the tables, views and CursorAdapters on the form. The table, view and CursorAdapter relationships defined by Referential Validation are used to automatically fill in the foreign key field(s) when a record is added to a child, grandchild, etc. table.

·       Child, Grandchild, Etc. Table Relations: If you are using child, grandchild, etc. tables for the form, the relations among the related tables must be set up in the form’s Data Environment. The Data Environment relations are used to position the record pointer of a child, grandchild, etc. table when the record pointer of a parent table, view or CursorAdapter is moved.

    Tip: Do not change the name of a relation in the Properties window.

·       Child, Grandchild, Etc. View or CursorAdapter Relations: If you are using child, grandchild, etc. views or CursorAdapters for the form, you cannot set a relation from a parent table, view or CursorAdapter into a child, grandchild, etc. view or CursorAdapter in the Data Environment. Instead, when you create the child view or CursorAdapter, you must create the view or CursorAdapter with a filter that has a variable name of “ParentPKValue”. This means that you create a Filter on the foreign key field or expression (if the foreign key is compound) that links the child to the parent with the “?ParentPKValue” variable name. See View Filters and CursorAdapter Filters.

·       Related Forms: A Related Pages Form can be a parent Related Form, but it cannot be a child Related Form.

·       Parent Mode: The Related Forms Parent Mode Toolbar control does not work with the pages on a Related Pages form. Users of a Related Pages form should use the Topmost Parent Toolbar List Control to change the Topmost Parent records.

·       Topmost Parent Toolbar List Control: Use the ProMatrix Toolbar List Builder to build the Toolbar List control for the Topmost Parent table, view or CursorAdapter pages (see ProMatrix Toolbar List Builder). The Toolbar List controls for child, etc. pages are created automatically by VPM Enterprise as described below.

·       Child, Grandchild, Etc. Toolbar List Control and Linking Tag for Tables: The Toolbar List control for a child, etc. table on a Related Pages form is automatically populated with the fields in the table’s index that you use to link the table to its parent in the Data Environment for the form. Therefore, you should create a linking index tag expression that begins with the child table foreign key field(s) that link the table to its parent followed by whatever fields you want to appear in the child page’s Toolbar List control. The columns on the Toolbar List control grid for a Related Pages child are not searchable or sortable.

·       Child, Grandchild, Etc. Toolbar List Control for Views and CursorAdapters: The Toolbar List control for a child, etc. view or CursorAdapter on a Related Pages form is automatically populated with the fields in the index tag definition that you use with the SetOrder method of the Data Handler object to set the order for the view or CursorAdapter (see “Setting the Order for Child Views and CursorAdapters” in Step 2, “Set Up the Data Environment and Form Properties”, in the following “How to Use the Related Pages Form Builder” section.) If you don’t use the SetOrder method to set the order for the view, the Toolbar List control is populated with the fields in the view’s or CursorAdapter’s primary key tag definition. If you don’t identify a primary key tag definition for the view or CursorAdapters in the Data Builder, the Toolbar List control is populated with the fields in the view’s or CursorAdapter’s foreign key tag definition that you identify when you set up Referential validation on the view’s or CursorAdapter’s foreign key field(s) that links it to its parent for the Related Pages form. The columns on the Toolbar List control grid for a Related Pages child are not searchable or sortable.

Tip: You can customize the Toolbar List control for tables, views and CursorAdapters on a Related Pages form. To learn how, see How can I customize the Toolbar List Grid for cursors on a Related Pages form?.

·       Child, Etc. Toolbar Filter Control: The Toolbar Filter control cannot be used on a child, grandchild, etc. page.

·       Child, Etc. Toolbar Order Control: The Toolbar Order control cannot be used on a child, grandchild, etc. page.

·       Adding a New Record: When you add a new record on a page, you must save the record before leaving the page. If you click on another tab, you will be prompted to save the record.

·       Topmost Parent ID: The Topmost Parent table, view or CursorAdapter is normally the significant table, view or CursorAdapter for a set of related pages. For example, a Related Pages form for employee data would normally have an employee master table as the Topmost Parent. Child, etc. pages would display data for the current employee. Therefore, when you are designing a Related Pages form, it is a good idea to include fields on child, etc. pages that identify the current Topmost Parent record. Alternatively, you can make some space above the pageframe on the form and display identification fields from the Topmost Parent.

·       aRelatedPgf Array: When a Related Pages form is initially activated, an array (aRelatedPgf) is created in the Activate method that stores information about each page. When a page is activated, information from the array is moved to the form properties that are used by the methods run from the Toolbar controls.

·       Comment Property: The Comment property of a page contains the alias of the table, view or CursorAdapter being edited on the page.

More:

How to Use the Related Pages Form Builder