Working with record definitions

A record definition is information that captures, or delineates, a set of records in a print image or PDF file. Because a print image or PDF file is an image, without any metadata identifying fields and records, you need to specify one or more record definitions to identify the records in the file, and differentiate them from surrounding data or white space.

Defining a set of detail records is required when defining a print image or PDF file. You may also want to define header or footer records, but they are not a requirement.

A detail record definition may be automatically created by Analytics during the file definition process, or you may have to manually create one or more record definitions.

The starting point is selecting an initial data value

The starting point for a record definition is selecting an initial data value in an initial data field. A character or characters in the initial data value, or in the row containing the initial data value, form the basis for the record definition, which identifies the set of records associated with the initial data field. For more information, see Defining and importing print image (report) files and PDF files.

Once the initial data field and the set of associated records are defined, you specify as many additional field definitions as required to break up the remaining portion of the record into its separate data elements.

The Record Definition dialog box

The Record Definition dialog box is where you specify the information that delineates a set of records in the source file. It allows you to perform two main tasks:

  • Specify the type of data represented by the records: detail, header, or footer
  • Modify or further build the criteria used to capture the set of records

You do not start completely from scratch. Analytics will already have specified some information, which you must often fine-tune, or add to.

The figure below shows the Record Definition dialog box with two criteria, and with its three menus open. The menus and the adjacent text fields are what you use to modify or further build the criteria that capture the set of records.

The Record Definition dialog box includes the following elements:

  1. Record type specification
  2. Individual criteria
  3. Criteria builder

The table below explains the purpose of each item in the Record Definition dialog box:

Item name

Purpose

Record Type:

  • Detail

  • Header

  • Footer

Specifies the type of data represented by the records: detail, header, or footer.

  • Detail records – the main information in a file

    For example, in a file listing overdue invoices, the invoice entries are the detail records. You can define only one set of detail records in a file.

  • Header records – the identifying information that appears above blocks or subsets of detail records

    For example, a file might list account information for each customer (header record), followed by a list of each customer’s unpaid invoices (detail record). If necessary, you can define more than one set of header records.

  • Footer records – information that appears below blocks or subsets of detail records

    For example, a file might list subtotals for each customer’s unpaid invoices (footer record). If necessary, you can define more than one set of footer records.

Note

Although header and footer data is initially treated like a separate record in the Data Definition Wizard, in the resulting Analytics table this data becomes one or more additional fields, with repeated values, added to the detail record.

Transparent

(applies to header records only)

Specifies that header records do not split multiline detail records.

If a header record splits a multiline detail record in the source file, which can happen at a page break, selecting Transparent unifies the detail record in the resulting Analytics table.

Record Name

Allows you to customize the default record names that appear in the leftmost column in the Data Definition Wizard.

You may find customizing a default name useful if you are creating multiple header or footer records. The value appears in the Data Definition Wizard only and does not appear in the resulting Analytics table.

Lines in Record

Specifies the number of lines that constitute a single record in the source file.

For example, if each detail record in the source file appears on a single line, then the value must be ‘1’. If each detail record spans three lines, then the value must be ‘3’.

Include or Exclude

(part of the criteria builder)

Specifies whether records that match the criteria should be included in, or excluded from, the set of records.

This menu contains the following options:

  • Include – include records that match the criteria
  • Exclude – exclude records that match the criteria

Match On

(part of the criteria builder)

Specifies the method to use, or the type of characters to use, to uniquely identify the set of records in the file.

This menu contains the following options:

  • Exact Match – matching records must contain the character, or string of characters, in the Text field, in the specified Line of the record, starting at the specified Start position
  • Alpha – matching records must contain one or more alpha characters, in the specified Line of the record, at the specified Start position, or in all positions of the specified Range
  • Numeric – matching records must contain one or more numeric characters, in the specified Line of the record, at the specified Start position, or in all positions of the specified Range
  • Blank – matching records must contain one or more blank spaces, in the specified Line of the record, at the specified Start position, or in all positions of the specified Range
  • Non-Blank – matching records must contain one or more non-blank characters (includes special characters), in the specified Line of the record, at the specified Start position, or in all positions of the specified Range
  • Find in Line – matching records must contain the character, or string of characters, in the Text field anywhere in the specified Line of the record
  • Find in Range – matching records must contain the character, or string of characters, in the Text field, in the specified Line of the record, anywhere in the specified Range
  • Custom Map – matching records must contain characters that match the character pattern in the Text field, in the specified Line of the record, starting at the specified Start position

    The Custom Map option uses the same syntax as the MAP( ) function.

Text

(part of the criteria builder)

For Exact Match, Find in Line, or Find in Range, specifies the character, or string of characters, that uniquely identifies the set of records in the file.

For Custom Map, specifies the character pattern that uniquely identifies the set of records in the file.

The field is disabled for the other Match On options.

Line

(part of the criteria builder)

Specifies which line of the record the criteria applies to.

For example, if you create a custom map to match zip codes, and the zip codes appear on the third line of a three-line record, you must specify ‘3’ in Line.

For single-line records, the value is always ‘1’.

Start or Range

(part of the criteria builder)

Specifies either:

  • the starting byte position in the record for the comparison against the criteria
  • the range of bytes in the record for the comparison against the criteria

You can highlight a position or range in the source file to automatically populate the Start or Range field. You can also manually enter position or range numbers. For ranges, uses the syntax start byte:end byte.

Logic

(part of the criteria builder)

Allows you to add or delete criteria, and specify the logical relations between criteria. You can add a maximum of 8 criteria.

This menu contains the following options:

  • And – adds an additional criterion with a logical AND
  • Or – adds an additional criterion with a logical OR
  • Insert Criteria – inserts an empty criterion below the criterion to which it is applied

    The criterion is initially inserted with a logical AND. You can change to a logical OR, but only after you have specified values for the inserted criterion.

  • Delete Criteria – deletes the criterion to which it is applied
  • New Group – creates a separate criteria group

    The New Group option allows you to build multiple criteria groups, which operate as separate blocks of logic. The groups are related to one another with either a logical OR or a logical AND.

  • End – designates a criterion as the final criterion

    Selecting End for a criterion deletes any subsequent criteria, including criteria in other groups.

Tip

The Logic buttons may become unresponsive if you are missing values in a criterion. Supply any missing values to reactivate the Logic buttons.