title: FreeMarker sum group
body: <p>I'm trying to do the following in Freemarker via NetSuite:</p>
  
  <p>I have the following data on a transaction record i.e. imagine a payment record with a number of lines</p>
  
  <pre><code>Doc No.   Amount
  1         100
  1         100
  2         50
  3         200
  4         50
  4         25
  5         1000
  </code></pre>
  
  <p>and I want to be able to output:</p>
  
  <pre><code>Doc No.       Total
  1             200
  2             50
  3             200
  4             75
  5             1000
  </code></pre>
  
  <p>I think you need to use #list and #assign but not sure??</p>