Bellow is an example of the field names to be summed:
Row1.SkilMiscCalc0
Row1 represents the number of rows from 1 to 25.
Calc0 represents the number of columns from 0 to 16.
I was thinking trying something like splitting Row1 from the field name and while it is less than 26 to increment up, then incrementing Calc0 up to 16 as I try to add up all the rows of each column.
The field doing the totaling would be SkilMiscCalc0Total.
In essence I'm trying to figure a way to create a document level function that could be put into SkilMiscCalc0Total and total all fields of say Row1 through 25 .SkilMiscCalc0 and then the same function in SkilMiscCalc1Total would sum all the values of its column.
I was thinking of using do while with .split and .slice or .join, but I'm confusing myself in how to approach this. Can this be done?
Thanks in advance for any help.
For example, using your existing names:
In this function you just pass in the column number, which the function uses to build the name of the field. You could also just pass in the name of the field within the row.
Or you could even use the name of the total field itself. Since this name can be obtained from the event object, the function wouldn't need any inputs.
For example, say the total field is named "SkilMiscCalc0Total". Then this function will add up all the columns named "SkilMiscCalc0"
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script