2022.2

Table Of Contents
bedisplayedinahintontheScriptspane.
Tip: Whenoneoftheincludeddatafieldsisempty,therespectiveline,includingtheprefix
andsuffix,isskipped.Theresultofthescriptwillbeshorter,causingtherestofthecontent
tomoveupordown.If,inaPrintcontext,youdon'twanttheresultofthescripttobepartof
thetextflow(forexample,whenaletterisgoingtobesentinanenvelopewithawindow),
puttheplaceholderforthescriptinapositionedbox(see"Boxes"onpage623and"Howto
positionelements"onpage686).
Tip:
l
AnexampleofhowtocreateanaddressblockusingtheTextScriptWizardisdescribedin
ahow-to.
SeeHowtocreateanAddressBlock.
l
Touseonlypartofadatafield,ortosplitthedata,youwillhavetowriteascript.
Foranexample,seethisHow-to:Howtosplitastringintoelements.
l
Areyoucurioustoseetheactualcodeofthescript?
Double-clickthescripttoopentheScriptWizard,andthenclicktheExpandbuttontosee
thecode.
Caution: Whenyouchangeanexpandedtextscriptandsaveit,itbecomes
impossibletoeditthescriptusingtheScriptWizardagain.
Formatting variable data
Thewayvariabledataaredisplayedinatemplatedependsontwothings.Firstly,thelocaleinfluences
thewaydates,times,numbersandcurrenciesareformatted;see"Locale"onpage706.Secondly,
therearefunctionstodisplayatextinuppercase,applythousandsseparatorstonumbers,etc.
TheText Helper Wizard(see"UsingtheHelperWizard"onpage725)andtheText Script Wizard
(see"UsingtheTextScriptWizard"onpage729)letyouselectaformatorenteraformatmaskfor
eachfieldthatthescriptaddstothetemplate.Thistopicdescribestheoptionsthatthewizardsoffer,
dependingonthetypeoffield.
ReopentheHelperorscriptbydouble-clickingitintheScriptspane.
Inanexpression,e.g.{{LastName}}(see"Variabledataintext:expressions"onpage722),youcan
typethedesiredformatfunctionbeforethefieldname,e.g.{{uppperCase LastName}}.Functionsinan
expressionarecalled"Helpers".ForanoverviewoftheavailableFormatHelperssee"FormatHelpers"
onpage769.
Theavailableformattingfunctionsdependonthedata typeofthecorrespondingfieldintheData
Model.Inadatamappingconfigurationyoucansetthedatatypeofeachfield.Whenyouopenadata
Page 732