2022.2

Table Of Contents
l
Placethecursorinthetemplatewhereyouwantthedatatobeinsertedandthendouble-
clickthedatafieldintheDataModelpane.
Note: Thisdoesn'tworkfordatainadetailtable.Dataindetailtablescanbeinsertedina
DynamicTableusingtheDynamicTablewizard(see"DynamicTable"onpage742).
Whathappensisthat:
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next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.
Page 728