Hello,
Javascript Summation is not working. Please help.
var i;
var lv_surTot1 = 0;
var lv_surTot2 = 0;
for (i = 0; i < (lt_prcom.length); i++) {
var lv_TC = lt_prcom.item(i).resolveNode("TypeCode").value;
var lv_mlonv = lt_prcom.item(i).resolveNode("MajorLevelOrdinalNumberValue").value;
if (lv_mlonv!= "850") {
var lv_CA = lt_prcom.item(i).resolveNode("CalculatedAmount").value;
if (lv_CA != null) {
lv_tot = lv_tot - lv_CA;
if (lv_TC == "ZSUR"){
lv_surTot1 = lv_surTot2;
lv_surTot2 = lv_CA;
lv_surTot1 = lv_surTot2 + lv_surTot1;
}
}
}
}
this.decSurTotAmt.rawValue = lv_surTot1 + 0.00;
Solved! Go to Solution.
Views
Replies
Total Likes
I did try the script by putting the random values and it does execute. What is the error you see?
I did try the script by putting the random values and it does execute. What is the error you see?
Hello,
I don't get any error but the sum is not working.
Individually, each of these variables when printed are displaying the values.
lv_surTot1 = lv_surTot2 + lv_surTot1;
The sum is not working.
Thanks,
Srini
the syntax is correct. Try executing on some other platform first and check.
Views
Likes
Replies
Views
Likes
Replies