By IrvingTI - Fri Feb 01, 2019 1:50 pm
- Fri Feb 01, 2019 1:50 pm
#822696
you have a dynaform with a grid, in which a column is configured to perform the auto addition. you want to obtain the value of the sum and assign it to a text field to later perform operations with this value
the code to perform these actions on web works perfectly, my problem is that mobile does not rescue the value of the sum.
example of my code:
the code to perform these actions on web works perfectly, my problem is that mobile does not rescue the value of the sum.
example of my code:
Code: Select all
"$ (" # GD_SERVICIOS "). Change (function () {
var rows = $ ("#GD_SERVICIOS"). getNumberRows ();
var sum = 0;
for (var i = 1; i <= rows; i ++) {
var price = $ ("# GD_SERVICIOS"). getValue (i, 5);
if (price! = '') {
price = $ ("# GD_SERVICIOS"). getValue (i, 5);
sum = price + sum;
}
}
var sum_real = sum;
$ ("# TXT_TOTAL_SERV"). SetValue (sum_real);
var t1 = $ ("# TXT_TOTAL_SERV"). getValue ();
var t2 = $ ("# TXT_TOTAL_ART"). getValue ();
console.log ("value t1:" + t1);
console.log ("value t1:" + t2);
total var = t1 + t2;
console.log ("total value:" + total);
var total_final = "$" + total;
console.log ("total_final value:" + total_final);
$ ("# TXT_TOTAL_FINAL"). SetValue (total_final);
}); "