Thanks @s.alpaslan I had seen that article.
I’ve now stripped everything down to basics, a form which contains a repeat based on datastore data. For every item in the datastore it repeats a row.
Each row contains two fields, filmID and lineQty, both of which are currently number fields.
<form id="cartForm" method="post" is="dmx-serverconnect-form" action="dmxConnect/api/order/checkout.php">
<div class="row" is="dmx-repeat" id="rCart" dmx-bind:repeat="cart.data">
<div class="col-12">
<div class="row">
<div class="col">
<input id="filmID" name="filmID" type="text" class="form-control" readonly dmx-bind:value="film_id" dmx-bind:name="record[{{$index}}][filmID]">
</div>
<div class="col">
<input id="lineQty" name="lineQty" type="text" class="form-control" readonly dmx-bind:value="qty" dmx-bind:name="record[{{$index}}][lineQty]">
</div>
</div>
</div>
</div>
</form>
Further down on the page I am trying to SUM the lineQty fields, so I use;
{{cartForm.data.repeat1.sum(`lineQty`)}}
Which doesn’t return anything. I’ve also tried the following combinations with no luck.
{{cartForm.data.repeat1.sum.toNumber(`lineQty`)}}
{{cartForm.data.repeat1.sum.toNumber()(`lineQty`)}}
{{cartForm.data.repeat1.sum(`lineQty`).toNumber()}}