2022.2

Table Of Contents
Example
AssumethataWorkflowprocesscanbetriggeredwhenanXMLfileappearsinacertainfolder.The
XMLfilecontainsdatathatyouwanttoshowonawebpage.
AddaSetJobInfosandVariablesTasktotheWorkflowprocess(seeSetJobInfosandVariablesinthe
WorkflowOnlineHelp).DefineaJobInfovariable(seeJobInfovariables),say,%9,andfillitwithdata
fromtheXML,forexample:
xmlget('/request[1]/values[1]/first[1]',Value,KeepCase,NoTrim)
InConnectDesigner,inaWebsection,youcanusetheautomationobjecttoretrievethevalueina
script,likethis:
var my_var = automation.jobInfos.JobInfo9;
context
InaControlScript,thecontextobjectrepresentsonecontextinthetemplate.
Whichcontextsareavailableinthetemplatecanbequeriedusingmerge.template.contexts.
Thecontextbeingmergedcanbequeriedusingmerge.context.
Field Type Description
sections
Array Arrayofsections(see"section"onpage1305)insideaparticularcontextdefinedinthetemplate.
Note: Whenusingmerge.context.sectionskeepinmindthatforexample'SectionX'
mightonlyexistinyourPrintcontext,sousingmerge.context.sections['Section X']
withoutenclosingitintheifstatementif (merge.context.type == Con-
textType.PRINT) {}willyieldanerrorwhenthescriptrunsforothercontexts.
Alternatively,usethetemplate objecttoaccessaspecificcontext:merge.tem-
plate.contexts.PRINT.sections['Section X'].
type
"ContextType"on
page1295
Thecontexttype:PRINT,EMAILorWEB.
Function Description
"query(selector)"
onpage1300
RunsaqueryacrossallsectionsinthePrintcontext.ThisfunctionisonlyavailableinPostPaginationScripts,whichareonly
appliedtothePrintcontext.See"PostPaginationScripts"onpage850.
Page 1273