ENABLE Reference Manual

ENABLE ATTRIBUTES
TREE Attribute
2. The join field of a child box must be a primary key field, an
alternate key field, a courtesy key field, or the leading
(leftmost) portion of a composite key field.
Alternate keys are not recognized within child boxes. To
provide a key for the subset of records that match the join
field within the child box, use the leftmost portion of a
composite key field for the parent join field. Use the
entire composite key field for the child join field. The
remaining (rightmost) portion of the composite key is then
recognized as a key for the matching records in the child
box.
After you identify links to connect the boxes within the tree
structure, you can determine the level at which each box is to
reside in the tree structure.
Levels of a Tree Structure. Levels are the portions of the tree
structure that determine the order in which boxes are used by an
application. ENABLE uses the levels to determine:
• The order in which boxes appear on the screen displayed by the
application. For example, the application displays a field or
fields from the box at the highest level of the tree before it
displays a field from any other boxes used by the application.
• The order in which the application can read and insert records
for the boxes. For example, the application must read or
insert a record from the box at the highest level of the tree
before it can read or insert records for any other boxes.
The simplest tree structure, built for a single-file application,
has only one level. More complex tree structures built for
multifile applications can have several levels. Each box used by
an application must reside at a specific level within the tree
structure.
A box that resides at the first (lowest) level of the tree
structure is the parent of all other boxes used by an
application. Only one box can reside at this level.
You must provide a link that connects the box at the first level
of the tree to one or more boxes at the second level. You can
link the boxes at the second level to other boxes at subsequent
levels of the tree structure. You cannot, however, link boxes at
the same level of the tree structure to each other.
4-82