2022.2

Table Of Contents
WhengeneratingoutputfromWorkflow,thejobfails.Workflowwilllogtheerrorandexecuteanyfollow-
upactionsthataredefinedintheOnErrortaboftherespectiveOLConnectContentCreationtask(All
inOne,CreateEmailContent,CreatePrintContent,CreatePreviewPDF,andCreateWebContent).
Formoreinformationabouthowtosetupfollow-upactions,seeUsingtheOnErrortabintheWorkflow
Help.
Note: Errorsthrowninatrystatementdonotabortcontentcreationortriggeranyfollow-up
actionsinWorkflow.Contentcreationwillcontinuewiththenextscript,thesamerecord.
for(...in...)
Canbeusedtoiterateoverfieldsinadatasetorrowsindetailtable.Alsoseehttps://developer-
.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in.
for(variable in object) { ... }
Iteratesovertheenumerablepropertiesofanobject,inarbitraryorder.Foreachdistinctproperty,state-
mentscanbeexecuted.
Examples
Thisscriptiteratesoverfieldnamesinthecurrentrecordandaddsthemtoaparagraph.
for(var i in record.fields){
results.after("<p>" + i + "</p>");
}
Selector Matched element Matched element after script execution
#test <h1id="test">Fields</h1> <h1id="test">Fields</h1>
<p>first</p>
<p>last</p>
<p>email</p>
Thisscriptiteratesoverfieldsinthecurrentrecord,retrievingtheirvalues.Thenitaddsthevaluestoa
paragraph.
for(var i in record.fields){
results.after("<p>" + record.fields[i] + "</p>");
}
Page 1174