I'm just trying to see my total amount of number variables with decimals but it's not working. My platform is Oracle Apex 20.2
var model = apex.region("itemig").widget().interactiveGrid("getViews", "grid").model;
console.log(model);
var amtKey = model.getFieldKey("ORAN");
//console.log(amtKey);
var totAmt = 0;
model.forEach(function(r) {
var n_amount = parseInt(r[amtKey], 10);
totAmt += n_amount;
console.log(n_amount);
});
$s('P705_TOTALORAN',totAmt);
Output was:
function Number() { [native code] }100507580901124105
What I want is to get the amount of numbers in totAmt
with decimals. I'm not getting far because of this native code. Can someone tell me what it is and hopefully, more importantly I can complete this part in my work?