cancel
Showing results for 
Search instead for 
Did you mean: 

How to do sub-totalling based on a certain field in Adobe-Forms?Please repl

Former Member
0 Kudos

How to do sub-totalling based on a certain field in Adobe-Forms?Please reply...

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Please find the below sample code to handle the page wise subtotals

Select "Events with Scripts" in the Show drop down list

Select "JavaScript" in the Language drop down list

Run at: "Client" as shown below.

var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);

var total = 0;

for (var i=0; i <= fields.length-1; i++) {

if (fields.item(i).name == "PRICE") {

total = total + fields.item(i).rawValue;

}

}

this.rawValue = total;

Thanks

Ramakrishna Pathi