2019.2

Table Of Contents
l Compare the contents of one region with another.
l Etc.
To access this data in the script, use the get() function of the boundaries object. This function
expects different parameters depending on the type of source file; see "Example" on page410.
Getting access to other data
Data that is not passed with the event, but that is necessary to define the record boundaries,
can be stored in the boundaries object using the setVariable function (see "boundaries" on
page408 and "Example" on page413). The data can be retrieved using the boundaries'
getVariable function (see "getVariable()" on page411).
This way the script can access values that were evaluated in previous pages or rows, across
delimiters, so you can easily set record boundaries that span over multiple delimiters.
For more information on the syntax, please refer to "DataMapper Scripts API" on page396.
Examples
Basic example using a CSV file
Imagine you are a classic rock fan and you want to extract the data from a CSV listing of all the
albums in your collection. Your goal is to extract records that change whenever the artist OR
the release year changes.
Here's what the CSV looks like:
"Artist","Album","Released"
"Beatles","Abbey Road",1969
"Beatles","Yellow Submarine",1969
"Led Zeppelin","Led Zeppelin 1",1969
"Led Zeppelin","Led Zeppelin 2",1969
"Beatles","Let it be",1969
"Rolling Stones","Let it bleed",1969
"Led Zeppelin","Led Zeppelin 3",1970
"Led Zeppelin","Led Zeppelin 4",1971
"Rolling Stones","Sticky Fingers",1971
Page 402