2022.2

Table Of Contents
l
withaNumberfield,Prefix:Your invoice(onespaceattheend),Suffix: is now ready to be
viewed!
l
withafieldLastName,Suffix<br/>(whichaddsalinebreak)
l
withafieldState,Prefix:,(commathenspace).
Tip: Foracommabetweenfields,usethePrefixofthesecondfield,ifyoudon’twanta
commawhenthesecondfieldhasnovalue.
6. TheWizardallowsyoutoreformatthedata(forexample,applyuppercase,applythousandsep-
aratorstonumbers,etc.).ClickthecolumnFormat,clickthedownwardpointingarrowandselect
oneoftheformats.Foranexplanationoftheformatssee"Formattingvariabledata"onthefacing
page.
7. Addasmanydatafieldsasyouneed,followingthesameprocedure.
8. Optionally,youcanclickOptionstospecifywhereandhowthescriptinsertsitsresults:
l
AsHTML.HTMLelementsintheresultsareprocessedanddisplayedasHTMLelements.
Forinstance,<b>this is bold</b>willbedisplayedasthis is bold.Thisisthe
defaultsetting.
l
Astext.Thisinsertstheresultsas-is,meaningHTMLtagsandelementsaredisplayedas
textintheoutput.Inthisscenario,"<br>"showsupinthetextanddoesnotinsertaline
break.Thisisthepreferredsettingifthescriptproducesplaintext.Itwillbeslightlyfaster
thanHTMLsinceitavoidsprocessingwithanHTMLparser.
l
AsthevalueofanattributeofanHTMLelement.Theselectorofthescriptshouldbean
HTMLelement.WhichattributesareavailabledependsontheselectedHTMLelement.If
thescript'sselectorisanimage(<img>element)forexample,andtheattributeissrc,the
scriptwillmodifytheimage'ssource.Thescript'sresultsshouldbeavalidvalueforthe
chosenattribute.
Note: Whenchecked,theoptionConvert fields to JSON stringwritestheresults
fromthescriptintoanattributeortextasaJSONstring.Thisisusefulforwebcon-
textswhereafront-endscriptcanreadthisvalueeasily.
9. ClosetheTextScriptWizardandtypetheplaceholderfortheresultsofthescriptinthecontentof
yourtemplate,ormakesurethatthereisatleastoneelementthatmatchestheselectorofthe
script.
10. HoveroverthenameofthescriptintheScriptspane.Intheworkspaceyouwillseewhichparts
ofthetemplateareaffectedbythescript.Ifthescriptproducesanerror,theerrormessagewill
Page 731