2022.2

Table Of Contents
individualsourcerecords.Anyelementsatthesamelevelastheparentelementoratahigherlevelare
repeatedineachsourcerecord.
Seealso:"JSONFileInputDatasettings"onpage313.
Recordboundaries
Boundariesarethedivisionbetweenrecords:theydefinewhereonerecordendsandthenextrecord
begins.Usingboundaries,youcanorganizethedatathewayyouwant.
Youcouldusetheexactsamedatasourcewithdifferentboundariesinordertoextractdifferentinform-
ation.If,forinstance,aPDFfilecontainsmultipleinvoices,eachinvoicecouldbearecord,orall
invoicesforonecustomercouldgointoasinglerecord.
Keepinmindthatwhenthedataismergedwithatemplate,eachrecordgeneratesoutput(print,email,
webpage)forasinglerecipient.
Tosetaboundary,aspecifictriggermustbedefined.
Thetriggercanbeanaturaldelimiterbetweenblocksofdata,suchasarowinaCSVfileorapageina
PDFfile.
Itcanalsobesomethinginthedatathatiseitherstatic(forexample,thetext"Page1of"inaPDFfile)
orchanging(acustomerID,ausername,etc).
Todefineamorecomplextrigger,youcanwriteascript(see"SettingboundariesusingJavaScript"on
page364).ThisoptionisnotavailablewithXMLandJSONfiles.
Anewrecordcannotstartinthemiddleofadatafield,soifthetriggerissomethinginthedata,the
boundarywillbesetonthenearestprecedingnaturaldelimiter.IfforinstanceinaPDFfilethetext
"Page1of"isusedasthetrigger,thenewrecordstartsatthepagebreakbeforethattext.
ForanexplanationofallBoundariesoptionsperfiletype,see"Boundaries"onpage313.
Dataformatsettings
BydefaultthedatatypeofextracteddataisaHTMLString,buteachfieldintheDataModelcanbeset
tocontainanotherdatatype(see"Datatypes"onpage275).WhenthatdatatypeisDate,Numberor
Currency,theDataMapperwillexpectthedatainthedatasourcetobeformattedinacertainway,
dependingonthesettings.
Thedefaultformatfordates,numbersandcurrenciescanbesetinthreeplaces:intheuserpref-
erences,inthedatasourcesettings,andperfieldintheDataModel.
Bydefault,theuserpreferencesaresettothesystempreferences.Theseuserpreferencesbecome
thedefaultformatvaluesforanynewlycreateddatamappingconfiguration.Tochangethesepref-
erences,selectWindow > Preferences > DataMapper > DataMapper default format(see"DataMap-
perpreferences"onpage786).
Page 226