viawebcenter
Member
In others words, I need multiply one numeric value (repeat group) with numeric records in another list.
Example: 2 * 5 = 10
Form 1
2 (record I put in repeat group)
List 2
5 (record saved in repeat group)
Final Result:
List 2
10
I found one js about it, but it only works with elements in the same repeat group:
var t= 0;
$('group2').getElements('.fabrikSubGroup').each(function(subgroup){
var v = subgroup.getElement('input[id^=tablename___value]');
var a = subgroup.getElement('input[id^=tablename___amount]');
t += (v.getValue().toInt() * a.getValue().toInt());
});
alert('total = ' + t);
Thanks
Example: 2 * 5 = 10
Form 1
2 (record I put in repeat group)
List 2
5 (record saved in repeat group)
Final Result:
List 2
10
I found one js about it, but it only works with elements in the same repeat group:
var t= 0;
$('group2').getElements('.fabrikSubGroup').each(function(subgroup){
var v = subgroup.getElement('input[id^=tablename___value]');
var a = subgroup.getElement('input[id^=tablename___amount]');
t += (v.getValue().toInt() * a.getValue().toInt());
});
alert('total = ' + t);
Thanks