Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Javascript to sum cells in a column

$
0
0

Hi all -

 

I've got an expanding table (rows can be added) and I'm trying to use the footer row of the column to compute the average of cells that don't have a value of 0.

 

Form Calc is usually great, but in this instance, I need to divide the sum by the number of cells that are not zero and I'm not sure how to do that via Form Calc.

 

Successfully used javascript to both identify the total number of instances and identify the number of instances that are zero, so the denominator part of the equation is fine. (# of instances - # of zeros = denominator.)

 

Now it's just the numerator. It's got to be a loop, right?

 

Table is called: table1

Row is called: data

cell is called: eValue

 

Any thoughts? Or more efficient methods? Thanks so much.

 

B


Viewing all articles
Browse latest Browse all 5571

Trending Articles



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