Expand my Community achievements bar.

adding a "total" Please HELP!

Avatar

Level 4

I have a form that has that has the capability to a row. I have a total field and I have a grand total field. How do I get the grand total field to calculate once rows are added to to the table? My total field is working just fine.

I looked at the purchase order example and the total field has the following (of course it doesn't work for me):

my numeric fieldname is TotalHr so I just replaced numAmount with TotalHr

calculate using FormCalc

// Verify at least one instance of the numAmount field exists.

if (exists(detail[0].numAmount) == 1) then

    Sum(detail[*].numAmount)

endif

7 Replies

Avatar

Level 10

Can you send the form to LiveCycle9@gmail.com so I can have a look at it..

Thanks

Srini

Avatar

Former Community Member

The code looks fine but you will have to cause the calculate event to fire again once the row is added. If you add the command:

xfa.form.recalculate(1);

to the end of the script that adds the row ...everything shoudl then work OK.

Paul

Avatar

Level 4

Srini,

I cannot "Thank You enough!!!

I see now what I was doing wrong!

Avatar

Level 4

Thanks for both of your help.