Form Detail

A form detail definition sets up the detail Drill Around process by associating a form field with a database record. Object windows and object views that have the same database file name entry as the form detail definition continue the Drill Around process. You must have a form detail definition for Drill Around (F5) to work. For information on object windows and views, see Object Rules.

The following entries make up a form detail definition. The number of DEFINE SCRDTL statements in a form rules file is not limited.

Use To
DEFINE SCRDTL

Begin each form detail definition.

Put the title for the initial window in the Drill Around process to the right of DEFINE SCRDTL. The title is required and must be inside double quotes.

ID Specify a unique identifier for this form rules object. For more information on IDs, see Form Rules Guidelines.
SCRFLD

Name the form fields that invoke this rule. You can list up to five form field names, separated by commas. Only field names defined in System Key Number Definition are valid.

For more information, see Doc for Developers: Application Development Workbench.

FILENAME Name the file that this rule accesses records in.
INDEX Name the index used to access the records.
KEYRNG

Name the key fields or values used to access records for the Drill Around process. Separate entries with a comma. The number of entries next to KEYRNG can be less than the number of key fields in the index (INDEX).

If you list values for all the index fields next to KEYRNG, DEFINE SCRDTL accesses a single record (similar to the record access DEFINE RULE). If you do not list values for all the index fields, DEFINE SCRDTL acts like a select definition. The order of the entries next to KEYRNG must follow the order of the index fields.

The following are valid entries for KEYRNG:

  • A form field name.

  • A function name.

  • A constant value, in double quotes.

    Include any leading or trailing spaces or zeroes in the double quotes. For example, to search for the constant value 4 in a numeric field of length 3, type "004" next to KEYRNG.

  • ~SPACES for spaces.

  • ~ZEROES for zeroes.

DSPFLDS

Name fields, from the primary file or a related file, that you want this rule to access. Use DSPFLDS when the form detail definition accesses more than one database record in the file. Usually, you list the next key field in the index (INDEX). If KEYRNG lists fields or values for all key fields in the index, you cannot use the DSPFLDS entry in the form detail rule.

The size of the displayed field defaults to the defined field size. To override the default size, use the following syntax.

DSPFLDS FieldName=size
The label for a field in a Select window defaults to the defined field name (for example, the label for the field Acct-Unit is Acct Unit). To override the default field label, use the following syntax.
DSPFLDS FieldName[=size]:"Label"

The colon (:) is the override operator. Put the field label inside double quotes.

To display no field label, use the following syntax.

DSPFLDS FieldName[=size]:"

Example for Detail Definition

When you use the Drill Around feature from the Company field in a form, the following form detail rule accesses a GLSYSTEM file record using the index GLSSET1, with no key values specified.

DEFINE SCRDTL       "Status Of All Companies"
    ID              IF-GLS-D-0003
    SCRFLD          COMPANY-01
    FILENAME        GLSYSTEM
    INDEX           GLSSET1
    KEYRNG          
    DSPFLDS         COMPANY:"Co",NAME:"Name",CURRENCY-CODE:"Base",
                    ACTIVE-STATUS:"Status",ACCT-PERIOD:"Pd",
                    FISCAL-YEAR:"Year",GL190-RUN-DT:"Posted"