2022.2

Table Of Contents
Objects
Object Description
"results"on
page844
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398).
"this"on
page781
AStandardscriptorPostPaginationscriptthathasitsscopesetto"Eachmatchedelement"(see"Settingthescopeofa
script"onpage373)willbecalledinaloopovertheelementsthatmatchtheselectorofthescript-theresults(see"res-
ults"onpage844).Insuchascript,thisisanobjectofthetypeQueryResult.Itrepresentsthecurrentelementintheloop.
ThisobjectisnotavailableinControlScripts,becausethattypeofscriptdoesn'thaveaselector(see"ControlScripts"on
page398).
"record"on
page744
Therecordinthemaindatasetthatiscurrentlybeingmerged.Togetthevalueofafieldintherecord,userecord.fields
['fieldname']orrecord.fields.fieldname.
"logger"on
page733
Globalobjectthatallowsyoutologmessages.
locale Defineswhichlocaletouse.(See"Locale"onpage295.)Notethatthevalueisread-only.
"formatter"on
page721
Globalobjectthatallowsyoutoformatvalues(suchasadateornumber).
automation ThisobjectencapsulatesthepropertiesoftheWorkflowprocessthattriggeredthecurrentoperation.NotavailableinPrintShopMail
Connect.
"merge"on
page856
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page844).
"contentitem"on
page841
(Printoutputonly.)ThecontentitemobjectholdsthePrintContentItemthatiswrittentotheConnect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719
Triggersafatalerrorthatabortscontentcreation.
"loadhtml()"onpage726 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 715