Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

IG JavaScipt

DernbauerMay 22 2022

Hello,
How can I add the values within a Grid
I did the following
var model = apex.region("IG1").widget().interactiveGrid("getViews","grid").model;
var var1 = model.getFieldKey("VAR1");
var sum;
model.forEach(function(igrow) {
sum = Number(sum) + Number(igrow[var1]);
console.log("VAR1" + var1);
console.log(Number(igrow[var1]));
console.log(sum);
})
console.log("Wert");
console.log(sum);

But it is always like this and not a sum
image.png
Thanks

Comments

Post Details

Added on May 22 2022
2 comments
52 views