cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe forms - sum up multiple tables columns

agnihotro_sinha2
Active Contributor
0 Kudos

Hi,

Requirement: Tables in my forms are dynam,ic, like it can range from T1,T2... Tn determined at runtime.

I have a column F1 in all these tables.

I want to sum up this columns values and print only once the sum at the end of page.

i know to sum up values of a column of 1 table only but how do i get sum of all dynamic tables columns.

is it possible using Formcalc or Jscript?

ags.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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;

This is a javascript code from adobe help. Here it depends whether all the tables have same column name.

Thanks,

Aravind

Answers (0)