on 07-08-2008 2:47 PM
Hi,
I've created a dynamic table. I'd like to calculate s.th. with dynamically added rows. How can I create a JS calculation referencing dynamic rows? Please find an example below :
working hours
dynamic row
dynamic row
...
sum = sum of dynamic rows
Any help is appreciated,
mading
Hi,
I watched the following seminar: https://admin.adobe.acrobat.com/_a200985228/p87746471/ and copied the following lines into my calculate event of a cell called "travelh_sum":
Code:
var flds = this.resolveNodes("$form..Travelinghrs[*].Amount");
var sum = 0;
for (var i=0;i<flds.length;i++)
{
if (isNaN(flds.item(i).rawValue))
sum+=flds.item(i).rawValue;
}
sum;
I got a big table with many columns. What I want to do, is calculate the amount of all travelling hours entered in the dynamically added cells "Travelinghrs". As far as I understand the code, it should work. I changed the cells to "numeric field". When I change to the pdf-preview, there is a "0" in the travelh_sum field but its not calculated. Maybe I can send you my pdf file...I dont want to upload it here for public access..
Thanks a lot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.