Livecycle calcsumrepeatfields Calculating sums of fields
Add a calculate event to the Sum field:
var fields = xfa.resolveNodes(“NumericField1[*]“);
var total = 0;
for (var i=0; i <= fields.length-1; i++) {
total = total + fields.item(i).rawValue;
}
this.rawValue = total;
Livecycle calcsumfieldsnested Calculating sums of fields
Add a calculate event to the Sum field:
var fields = xfa.resolveNodes(“detail[*].NumericField1″);
var total = 0;
for (var i=0; i <= fields.length-1; i++) {
total = total + fields.item(i).rawValue;
}
this.rawValue = total;
Livecycle calcsumfieldsfirstpage Calculating sums of fields
Add a calculate event to the Sum field:
var fields = xfa.layout.pageContent(0 , “field”, 0);
var total = 0;
for (var i=0; i <= fields.length-1; i++) {
if (fields.item(i).name ==”NumericField1″) {
total = total + fields.item(i).rawValue;
}
}
this.rawValue = total;
See also 

Calculating sums of fields