2022.2

Table Of Contents
Extract the sum or totals.Iftherecordcontainssumsortotalsattheendofthelineitemslist,
theendoftheRepeatstepisagoodplacetoaddanExtractstepforthesedata.Aftertheloop
step,thecursorpositionisattheendoflineitems.Alternatively,right-clickontheendofthe
RepeatstepintheStepspanelandselectAdd a Step > Add Extraction.
Tip: Thishow-todescribesindetailhowtoextractanitemdescriptionthatappearsinavariable
numberoflines:Howtoextractmultilineitems.
Extractingdataofvariablelength
InPDFandTextfiles,transactionaldataisn'tstructureduniformly,asinaCSV,databaseorXMLfile.
Datacanbelocatedanywhereonapage.Therefore,dataareextractedfromacertainregiononthe
page.However,thedatacanbespreadovermultiplelinesandmultiplepages:
l
Lineitemsmaycontinueonthenextpage,separatedfromthelineitemsonthefirstpagebya
pagebreak,anumberofemptylinesandaletterhead.
l
Datamayvaryinlength:aproductdescriptionforexamplemayormaynotfitononeline.
Howtoexcludelinesfromanextractionisexplainedinanothertopic:"Extractingtransactionaldata"on
page235(seeFromaPDForTextfile).
Thistopicexplainsafewwaystoextractavariablenumberoflines.
Text file: setting the height to 0
IfthevariablepartinaTXTfileisattheendoftherecord(forexample,thebodyofanemail)theheight
oftheregiontoextractcanbesetto0.ThisinstructstheDataMappertoextractalllinesstartingfrom
thecurrentpositioninarecorduntiltheendoftherecord,andstoretheminasinglefield.
Thisalsoworkswiththedata.extract()methodinascript;see"extract()"onpage375.
Page 245