2022.2

Table Of Contents
Note: WhenBlockHelpersareusedinasection,anychangesthatyoumakeinPreviewmode
arerevertedwhenyouswitchbacktoDesignmode.Inotherwords,editinginPreviewmodeis
notsupported.
UsingtheHelperWizard
Arethereemptyfieldsinthedata?Andisthevalueofadatafieldprecededorfollowedbyaspace,line
breakortextinthetemplate,likeinanaddress block?ThenitisbesttousetheHelperWizard.Other-
wise,emptydatafieldswillcauseemptylinesandsuperfluouswhitespacestoshowupinthetext.
TheHelperWizardcreatesa"Helper"-afunctionthatcanbecalledinanexpression.Whencalled,the
Helperinsertsoneormoredatafieldsintoyourtemplate,eachwithanoptionalprefixandsuffix.
Thewizardalsomakesiteasiertoformatdatadifferently,forexample,displayanumberasacur-
rency.
1. OpentheHandlebarsTextHelperWizard:ontheScriptspaneatthebottomleft,clicktheblack
triangleontheNewbuttonandclickHandlebars Text Helper.
2. ChangethenameoftheHelpertomakeclearwhatitdoes.Thenamemustbeunique.
ThenameoftheHelperiswhatyouuseinanexpression.Forexample,ifitsnameisMyHelper,
thentheexpressionthatcallstheHelperis{{MyHelper}}.
3. ClickthedownwardpointingarrowinthefirstrowinthecolumnField.Selectadatafieldfromthe
listthatappears.
4. AddaPrefixand/oraSuffix.Theprefixandsuffixcancontaintextand/orHTMLtags.Youcan
addlinereturnsandstatictext,suchas:
l
withaNumberfield,Prefix:Your invoice(onespaceattheend),Suffix: is now ready to be
viewed!
l
withafieldLastName,Suffix<br>(whichaddsalinebreak)
l
withafieldState,Prefix:,(commathenspace).
Note: Ifafieldisempty,theprefixandsuffixwillbeignored.
Tip: Foracommabetweenfields,usethePrefixofthesecondfieldifyoudon’twanta
commawhenthesecondfieldhasnovalue.
5. TheWizardallowsyoutoformatthedata(forexample,displayatextinuppercase,applythou-
sandsseparatorstonumbers,etc.).ClickthecolumnFormat,thenclickthedownwardpointing
arrowandselectoneoftheformats.Foranexplanationoftheformatssee"Formattingvariable
data"onpage317.
Page 310