2022.2

Table Of Contents
Note: InOLConnectitisn'tpossibletosetaloglevelfortheHelper.Theloglevelisalways'info'.
LogmessageswillappearintheMessagespane(see"PreflightResultsandMessages"onpage975).
EscapingHandlebarsexpressions
Handlebarscontentmaybeescaped-i.e.displayedasis,withoutevaluatingtheexpression-bypre-
fixingitwith\(abackslash).Forexample:\{{FieldName}}willshowupintheoutputas{{FieldName}},
insteadofbeingreplacedwiththevalueofthedatafieldFieldName.
Rawblocks-Handlebarsexpressionswithfourcurlybracesatthestartandend-arenotsupported.
Using functions in expressions: Helpers
Note: TheinformationinthisOnlineHelpfocusesontheimplementationofHandlebarsinOL
Connect.ForgeneralinformationaboutHandlebarsandhowtouseit,seethefollowingweb
sites:https://handlebarsjs.com/andhttps://devdocs.io/handlebars.
FunctionsthatcanbeusedinaHandlebarsexpressionarecalledHelpers.
Example: {{dateLongDueDate}}
Inthisexample,dateLongisthenameofoneoftheFormatHelpersinOLConnect,andDueDateisthe
nameofadatafield.Whenthetemplateismergedwithdata,thisexpressionreturnsthevalueofthe
DueDatefield,formattedasalongdate,e.g."February23,2022".
AnythingthatfollowsaHelperinanexpressionispassedtotheHelperasaparameter.
Theparameterdoesn'thavetobeadatafield.ItcanalsobeanotherHelperthatreturnsavalue.Thisis
calledasubexpression.
Example: {{dateLongtoday}}
Inthisexample,todayisthenameofaHelperthatreturnsthecurrentdate.Thecurrentdateisthen
passedtodateLong,sothatthisexpressionreturnsthecurrentdateformattedasalongdate,e.g.
"February23,2022".
NotethattodayisnotaHelperthatisprovidedbyOLConnect;itisacustomHelper.Tolearnhowto
createthisandothercustomHelpers,see"CreatingcustomHelpers"onpage771.
Subexpressionsaredelimitedbyparentheses.
{{#ifeqab}}.
{{#if(eqab)}}butnowthoseparenthesesareoptional.
Note: Expressionsareevaluatedfromrighttoleft.
Page 766