Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Forms
Viewing all articles
Browse latest Browse all 61369

Calculate page subtotals in repeating dynamic subform

$
0
0

Hello,

 

I have a repeating subform that can span many pages, at the bottom of the list I have a grand total.......thats great

 

I would like to add a subtotal for each page of the repeating subform. How can I do this?

 

I have the following code for my grand total:

 

 

// Acquire all "Amount" Fields there are inside a subform

var

 

flds = xfa.form.form1.resolveNodes("$form.form1.table1_rows[*].tvos_t1");

// Loop over list of fields and add up values

var

 

sum = 0;

for

 

(var i=0;i<flds.length;i++)

{

 

// Test fields value to make sure it is a number before

 

// including it in the Sum

 

if(!isNaN(flds.item(i).rawValue))

sum

+= flds.item(i).rawValue;

}

// Ensure that "sum" is the last value run in the script

sum;

 

 


I guess I will need some pagination settings as well,

 

all help hugely appreciated!


Viewing all articles
Browse latest Browse all 61369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>