Controlling and Dependent Structures

Controlling and dependent structures allow attributes to be linked together within an item. One attribute controls one or more other attributes. The controlling/dependent structure is defined in attribute 4 (structure) of the attribute-defining item.

Rules for a controlling/dependent relationship are:

There must be a dependent attribute.

Controlling/dependent relationships can be very useful when using a more complicated item structure. For example, an invoice file can be created with the following attributes:

invoice.number

invoice.date

customer.account.number

part.number

quantity

price

freight.charges

taxes

The part number, quantity, and price attributes are prime candidates for a controlling/dependent structure. The part number is the controller and both the quantity and price attributes depend on the part number. In this case, part number must be part of the output list in order to output quantity or price.

When using AQL or Update Processor, not every dependent attribute must be listed. However, the controlling attribute must be output to see any or all dependent attributes. When MultiValues are entered, a part number value must have corresponding quantity and price values, even if these are null. This assures that the third value in the price attribute corresponds to the third value in the part number attribute.

The Update Processor recognizes the controlling/dependent structure and tries to list the attribute names across the screen, reminding you that these are controlling/dependent attributes.

To use a controlling or dependent structure some of the time and avoid it other times, create an additional attribute-defining item for these attributes and keep the controlling or dependent structure empty.

As the controlling or dependent structure links the nth value in the controlling attribute to the nth value in the dependent attributes, it would be unwise to permit these values to be independently edited, or the number of values can become unbalanced. If it does, the system may report it with error [68] from the messages file.

See Also

D3 User’s Guide Overview

Introduction to D3

Logging On and Off D3

Accessing Files and Items

D3 Dictionary Structure

Dictionary Item Types

Processing Codes

Designing a Database

Creating a Database in D3

Virtual Machine Environment in Windows

File System Interface

D3 Windows Utilities

System Structure

Proc

Editor

Update Processor