hvrdhn88
Giga Patron

@Martin_samek  Your script log should be inside while block.

You can not retrieve field value before next() method. 

 

try to add log inside while block then you should get the value. 

 

eg:


  while (amountGR.next()) {

  //even this part is returning 'null' into my log
  gs.info("Amount is " + parseInt(amountGR.getValue('amount'), 10));

      sum = sum + parseInt(amountGR.getValue('amount'), 10);
  }