Defining attributes

An attribute-defining item (ADI) describes, formats, and manipulates data contained within data files. They are located in a file's dictionary or in the account's master dictionary. ADIs are used by nearly all D3 processors to create data interrelationships, format data, or select data.

Each ADI in the dictionary uses its name as its item-ID. There may be several attribute-defining items (and synonyms) that refer to the same attribute in an associated data file item. This typically is done when an expanded name is needed for clarity and also when different views are needed for the same data element. There is no limit to the number of attribute-defining items that can describe a specific attribute.

Note: The use of null item-IDs should be avoided. The use of null item-IDs can cause system processors that are dependent on spaces as delimiters to not recognize a null item-ID surrounded by a space, since it would appear to be just two spaces and considered a delimiter.

The definition of the attributes and the attribute's master dictionary ADI are listed below.

Attribute Attribute Name Description
0 Item-ID Item-ID (or name) of the ADI in the dictionary. For example, the attribute-count item, usually found in an account's master dictionary, defines the second attribute of an ADI.
1 Dictionary-Code Contains an a, s, or x to indicate that the item is an attribute-defining item.
  • a indicates the base attribute definition.

  • s defines synonym or redefinitions of an attribute.

  • x defines protected attribute definitions.

By convention, there is usually only one a attribute-defining item per attribute to define each attribute. All other ADIs for the same attribute are given an s or x designation. An optional description or text string may follow the a, s, or x without affecting normal functions.

Dictionary synonym-defining items (dictionary code of s) behave just like attribute-defining items (dictionary code of a). They are used when there are multiple attribute-defining items for the same attribute. (Multiple attribute-defining items for the same attribute allow applications to process the same data in different ways.) By convention, the primary attribute-defining item is created with a dictionary code of a. Any other attribute-defining items for the same attribute are created with a dictionary code of s.

2 Attribute-Count The number stored in attribute 2 is the attribute number where the defined attribute values are stored in each item. The first attribute in an item has an attribute-count of 1, the nth attribute has an attribute-count of n. It is used to physically locate the attribute values within the item of the associated file.
3 Substitute-Header Used to specify report column headings in the associated file. If a subheader is not specified, the attribute name is used as the column heading. If the column width specified in attribute 10 is not wide enough to display the heading, the column is expanded. A backslash (\) can be placed in attribute 3 to print no column header. The subheader may be MultiValue to output a multiline heading.
4 Structure Used to establish internal relationships within an item. The relationship between controlling and dependent attributes is such that a value must be entered into a controlling attribute before the Update processor allows entry of values into dependent attributes. Each MultiValue for the controlling attribute controls the corresponding values in the dependent attribute. The codes c or d are used to specify controlling or dependent attributes respectively. The format for usage of these codes is:
c; attr#; attr#;...
d; attr#

Any attribute specified by a c as controlled by that attribute must also have an attribute-defining item with attribute 4 specified by a d;attr#, where attr# is the attribute number of the controlling attribute.

The attributes dependent upon the controlling attribute must contain a d (dependent) code in attribute 4.

In an AQL report, to see dependent attributes, controlling attributes must be specified.

The controlling form c; (controlling with no dependents) is valid and can be used to force the Update processor to display the substitute-header above the field value.

In the Update processor, to see dependent attributes, controlling attributes must be specified.

5 - 6 Reserved Reserved and Unavailable
7 Output-Conversion Contains processing codes which, prior to output, modify non-null data contained within the referenced attribute. Processing codes are used to perform data manipulations which often remove the need for a program. See Processing codes (Update processor).
8 Correlative Contains processing codes similar to the output-conversion attribute, except the codes specified within this attribute are used to preprocess data prior to sorting or selecting in addition to display.
9 Attribute-Type Contains codes used to indicate the type of justification used on the attribute.
10 Column-Width The column-width attribute is used to define the minimum number of character spaces allocated to display the data within the attribute on AQL reports. The actual column width used is dependent upon the column-width attribute, the substitute-header attribute, the item-ID, the attribute-type attribute, and the width of the display.
11 - 13 Reserved Reserved and Unavailable
14 Input-Conversion Contains processing codes that are applied to data immediately after entry. These codes can be used for data validation and transformation, and are executed even if there is a null entry.
15 macro The attribute names contained in the macro attribute are passed as an attribute name list to the Update processor when zooming to another item. The values named in this attribute are separated by spaces, not punctuation.
16 Reserved Reserved and Unavailable
17 Description Reserved for comments and descriptions concerning the function of the current attribute-defining item. The text in this attribute displays as the Update processor help message when a ? is entered at the prompt.
18 - 19 Reserved Reserved and Unavailable
20 - 30 Hot Keys (hotkey.all, hotkey0,...hotkey9) Eleven hot keys are available to provide quick access to FlashBASIC programs from within the Update processor. The hot keys are defined in a file-defining item (FDI) and attribute-defining item (ADI). The values of these keys are specified in attributes 20 through 30 in the file-defining item or attribute-defining item. Attribute 20 is hotkey.all, attribute 21 is hotkey1, and attribute 30 is hotkey0. Select the hot key to use by pressing CTRL+Xn, where n is a hot key number (0-9). Whenever a hot key is selected, one hot key entry is used based upon the following search:
  • If the attribute-defining item has a hotkey.all entry, it is used.

  • If the attribute-defining item has a hot key number defined, where n is the number entered by the user, that hot key entry is used.

  • If the file-defining item has a hotkey.all entry, it is used.

  • If the file-defining item has a hot key number defined, where n is the number entered by the user, that hot key entry is used.

Only the first hot key entry found in the above search sequence is used. No parameters can be passed to the FlashBASIC subroutine called from a hot key.

Example(s)

The processing codes in the two attribute-defining items below have a controlling dependent relationship.

dictionary-code a
attribute-count 2
substitute-header  
structure c;3
output-conversion  
correlative  
attribute-type l
column-width 10
input-conversion  
macro  
output-macro  
description This attribute controls attribute 3.

dictionary-code a
attribute-count 3
substitute-header  
structure d;2
output-conversion  
correlative  
attribute-type lw
column-width 10
input-conversion  
macro  
output-macro  
description Dependent upon attribute 2.

The following attribute-defining item can be placed in a master dictionary and used for general purpose counting when you want to know the number of items matching a specific criteria.

item-ID: tally
dictionary-code a
attribute-count 999
substitute-header  
structure  
output-conversion mrz
correlative a"1"
attribute-type r{x}
column-width 4
input-conversion  
macro  
output-macro  
description Provides a constant value of 1 for commands. For example, "total tally det-supp," shows the number of items from each break-on.
hotkey.all