2022.2

Table Of Contents
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"onpage336.
Subexpressionsaredelimitedbyparentheses.
{{#ifeqab}}.
{{#if(eqab)}}butnowthoseparenthesesareoptional.
Note: Expressionsareevaluatedfromrighttoleft.
Subexpressionscan,butdon'thavetobe,delimitedbyparentheses.Forexample,{{#if eq a b}}
and{{#if (eq a b)}}arebothvalid.
Formatting
OLConnectprovidesanumberofHelperstoformat the valuethatistheresultofanexpression.Fora
list,see"FormatHelpers"onpage334.
Logic
OLConnecthasanumberofadditionalHelpersthatallowfortheuseoflogicinexpressions.
l
eq(equal),neq(notequal)-teststwovaluesforequality
l
gt(greaterthan),gte(greaterthanorequal),lt(lowerthan),lte(lowerthanorequal)-com-
parestwonumbervalues
l
not,or,and-logicaloperators
l
add-addstwonumbervalues
l
sub-subtractstwonumbervalues
l
mul-multipliestwonumbervalues
Page 331