2022.2

Table Of Contents
Objects
Object Description
"results"on
page1301
Thisobject-ofthetype:QueryResults-isusedtomanipulatethecontentofthetemplate.ItcontainstheHTMLelementorsetof
HTMLelementsthatmatchtheselectorofthescript,specifiedinthescripteditor.
ThisobjectisnotavailableinControlScripts,becausethattypeofscriptdoesn'thaveaselector(see"ControlScripts"onpage838).
"this"on
page1237
AStandardscriptorPostPaginationscriptthathasitsscopesetto"Eachmatchedelement"(see"Settingthescopeofa
script"onpage813)willbecalledinaloopovertheelementsthatmatchtheselectorofthescript-theresults(see"res-
ults"onpage1301).Insuchascript,thisisanobjectofthetypeQueryResult.Itrepresentsthecurrentelementintheloop.
ThisobjectisnotavailableinControlScripts,becausethattypeofscriptdoesn'thaveaselector(see"ControlScripts"on
page838).
"record"on
page1199
Therecordinthemaindatasetthatiscurrentlybeingmerged.Togetthevalueofafieldintherecord,userecord.fields
['fieldname']orrecord.fields.fieldname.
"logger"on
page1188
Globalobjectthatallowsyoutologmessages.
locale Defineswhichlocaletouse.(See"Locale"onpage706.)Notethatthevalueisread-only.
"formatter"on
page1175
Globalobjectthatallowsyoutoformatvalues(suchasadateornumber).
"automation"on
page1272
ThisobjectencapsulatesthepropertiesoftheWorkflowprocessthattriggeredthecurrentoperation.NotavailableinPrintShopMail
Connect.
"merge"on
page1313
ThemergeobjectismainlyusedinControlScripts.Itgivesaccesstothetemplatewithallofitscontexts,sectionsand
runtimeparameters.Itdoesn'tgiveaccesstothecontentofthesections.Tochangethecontentofasection,youwouldcre-
ateascriptwithaselectorandusetheresultsobjectinthescript(see"results"onpage1301).
"contentitem"on
page1298
(Printoutputonly.)ThecontentitemobjectholdsthePrintContentItemthatiswrittentotheConnectdatabasewhengen-
eratingPrintoutput.ItallowsyoutoaddcustompropertiestothePrintContentItem,intheformofkey-valuepairs(aJSON
string).
Note: ThecontentitemobjectisnotavailableinPrintShopMailConnect,duetotheabsenceofaConnectdata-
base.
Globalfunctions
Function Description
"fatalError(message)"on
page1173
Triggersafatalerrorthatabortscontentcreation.
"loadhtml()"onpage1182 LoadsHTMLdatafromanHTML(snippet).ThereturnedHTMLcanbeplacedintoavariableorintoasetofHTMLele-
ments.
Page 1170