2022.2

Table Of Contents
<tr>
<th class="h3">{{#if @first}}Clause(s){{/if}}</th>
<td>{{Descr}}</td>
</tr>
{{/each}}
{{/unless}}
</tbody>
</table>
#with and #each
This#withblockcallsacustomHelper(see"CreatingcustomHelpers"onpage336)thatreturnsan
objectwiththeproperties:object,amount,coverageandpremium.Theobject'spropertiesare
accesseddirectlyinsidetheblock.The#withblockisexecutedforeachoftherecordsinadetailtable
calledinsurance_coverage.
{{#each insurance_coverage}}
{{#with (getObjectAndCoverage)}}
<tr>
<td>{{object}}</td>
<td class="curr">€</td>
<td>{{amount}}</td>
<td>{{coverage}}</td>
<td class="curr">€</td>
<td>{{premium}}</td>
</tr>
{{/with}}
{{/each}}
Format Helpers
OLConnectprovidesanumberofHelperstoformat a valuethatistheresultofanexpression.
A"Helper"isafunctionthatcanbecalledinanexpression.
Example: {{dateLongDueDate}}
Inthisexample,dateLongistheHelper,andDueDateisthenameofadatafieldthatcontainsadate.
Theexpressionreturnsthedate,formattedasalongdate,e.g.February 23, 2022.
Note: Therulesofthecurrentlocalealsoinfluencethewaythedataisformatted;see"Locale"on
page295.
Tochangetheformatoftheoutputofanexpression,simplytypethenameofaHelperintheexpres-
sion.WhichHelpersworkdependsonthetypeofthedata.
ThistopicliststheavailableHelpersthatcanformatavaluebydatatype.
Note: ThenamesoftheseHelpersarecasesensitive.Forexample,"upperCase"works,but
"uppercase"doesnot.
Page 334