I want to calculate the total for a field of repeating item, from the Level Scripting Support, the resolveNodes is supported in mobile HTML form. But after getting the repeating object using resolveNodes, how can we get the length of the object for calculating.
I used the objs.length but it is undefined. Here are the my script as example:
var objs = expenses.expensesWrapper.resolveNodes("expenseRow[*]");
xfa.host.messageBox(objs,"",0,0);
xfa.host.messageBox(objs.length,"",0,0);
var sum = 0.0;
for (var i = 0; i < objs.length; i++){
sum += objs.item(i).total.rawValue;
}
expenses.total.subTotal.rawValue = sum;