2022.1

Table Of Contents
Record boundaries
Boundaries are the division between records: they define where one record ends and the next
record begins. Using boundaries, you can organize the data the way you want.
You could use the exact same data source with different boundaries in order to extract different
information. If, for instance, a PDF file contains multiple invoices, each invoice could be a
record, or all invoices for one customer could go into a single record.
Keep in mind that when the data is merged with a template, each record generates output
(print, email, web page) for a single recipient.
To set a boundary, a specific trigger must be defined.
The trigger can be a natural delimiter between blocks of data, such as a row in a CSV file or a
page in a PDF file.
It can also be something in the data that is either static (for example, the text "Page 1 of" in a
PDF file) or changing (a customer ID, a user name, etc).
To define a more complex trigger, you can write a script (see "Setting boundaries using
JavaScript" on page414). This option is not available with XML and JSON files.
A new record cannot start in the middle of a data field, so if the trigger is something in the data,
the boundary will be set on the nearest preceding natural delimiter. If for instance in a PDF file
the text "Page 1 of" is used as the trigger, the new record starts at the page break before that
text.
For an explanation of all Boundaries options per file type, see "Boundaries" on page353.
Data format settings
By default the data type of extracted data is a HTMLString, but each field in the Data Model can
be set to contain another data type (see "Data types" on page310). When that data type is
Date, Number or Currency, the DataMapper will expect the data in the data source to be
formatted in a certain way, depending on the settings.
The default format for dates, numbers and currencies can be set in three places: in the user
preferences, in the data source settings, and per field in the Data Model.
By default, the user preferences are set to the system preferences. These user preferences
become the default format values for any newly created data mapping configuration. To change
these preferences, select Window > Preferences > DataMapper > DataMapper default
format (see "DataMapper preferences" on page893).
Page 252