Home » Java » java – How to calculate the listed numbers from the child datastore?-Exceptionshub

java – How to calculate the listed numbers from the child datastore?-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I’m using the Synesty SpreadsheetMapper tool, I want to get the total of the children column from the field “PackageWeight” and show it in the parent column field.

This code only shows the listed numbers from the children datastore.

<#if (row.children()?? && row.children()?size > 0)>

  <#list row.children() as c>
   ${c.get('PackageWeight')!}, 
  </#list>
</#if>

How can I sum the listed numbers?
Here is the example https://prnt.sc/r3y223

How to&Answers: