2022.2

Table Of Contents
o
Aplaceholderforthevalueofthedatafieldshowsupinthetext.Itlooksasfollows:
@FIELDNAME@.
o
AscriptappearsintheScriptspaneatthebottomleft.
Tip: Double-clickthescripttoopentheTextScriptWizardandaddmorefieldstothesame
script.See"UsingtheTextScriptWizard"onthefacingpage.
Thescriptreplacestheplaceholdersinthecontentwiththevalueofadatafieldinthecurrentrecord.
SwitchtothePreviewtabatthebottomoftheworkspacetoseethescriptinoperation.Thevalueofthe
correspondingdatafieldinthefirstrecordappearsinsteadoftheplaceholder,everywherewherethe
placeholderisfoundinthetext.Thisvaluewillberefreshedwhenyoubrowsethroughtherecordsin
theDataModelpane.
Whentheoutput(theletter,email,etc.)isgenerated,thetextscriptexecutesforeachrecordinthe
recordset,andeachtimeitreplacestheplaceholderswiththevalueofthefieldinthecurrentrecord.
IntheScriptspaneyoucanseethatthescripthasanameandaselector.Theselectoriswhata
scriptlooksforinthetemplate.
l
Thedrag-and-dropmethodautomaticallygeneratesascriptthatisnamedafterthedatafield
(seetheScriptspane).
l
Bydefaultthedrag-and-dropmethodwrapstheplaceholdertextinaSpan.(Selecttheplace-
holderandswitchtotheSourcetabtoseetheSpanelement.)TheSpan'sclassisusedas
selector.Notethatanyspacesthatoccurinadatafieldnamewillberemovedfromthescript
selector.
WhenyoudragthesamefieldfromtheDataModeltothecontentagain,asecondplaceholderappears
inthetext,butnonewscriptisadded.Theexistingscriptwillreplaceallplaceholdersthatmatchits
selector.
YoucouldalsodragascriptwithanIDand/orclassselectorfromtheScriptspaneintothetemplateto
insertanadditionalplaceholder.
Tip: DragthedatafielddirectlytotheScriptspanetocreateascriptwithaclassselector,
withoutaddingaplaceholdertothetemplate.HoldingtheAltkeywhiledraggingcreatesascript
withatextselector.
Note: Connectversionsolderthan2020.2usedtheplaceholdertextasthescript'sselector.
Lookingfortextinatextisalessoptimizedoperationandmayimpactoutputspeedsinlonger
documents.ForthatreasonplaceholdersarenowbydefaultwrappedinaSpanandtheclassof
thatSpanisusedasthescript'sselector.
Page 313