1.6

Table Of Contents
already available through the GUI when setting the trigger to On Page and specifying 3 as the
Number of Pages.
Note
Remember that your script is being called on each new delimiter encountered by the DataMapper
parsing algorithm. If you are dealing with a DB Query that returns a million records, the script will
be executed a million times! So you have to craft your script in such a way that it doesn't waste too
much time examining all possible conditions. Instead, it should terminate as soon as any condition
it's evaluating is false.
Data available inside each event
Every time the event is triggered, it has access to the entire data between the current location
and the next delimiter. So if you are just beginning the process for a PDF or text file, you have
access to the first page only. For CSV/DB, it means you have access to the one record line at
the current location.
This means that you can:
l Examine the data found in between delimiters for specific conditions.
l Examine specific regions of that data, or the available data as a whole.
l Compare the contents of one region with another.
In fact, make all the comparisons you want as long as it's all located in the data between the
current location and the next delimiter.
What happens when the record boundaries depend on data found on different pages,
within the same record?
The API allows your script to "remember", across delimiters, the values that were evaluated in
previous pages so you can easily set record boundaries that span over hundreds of delimiters
(or more).
Page 221