These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calculations using FormCalc not working as expected.

jonchalk
Registered: Dec 15 2007
Posts: 8

I am using Adobe LiveCycle 8.05. I am using formCalc to enter simple formulas.

In my example I have 6 fields to add amounts (numbers)

field_a
field_b
field_c
field_d
field_e
field_f

I was successful in creating the calculation to add the fields "field_a + field_b + field_c" to get the answer to appear in field "d". However, in field "f" I entered "field_d + field_e" expecting the answer to appear in field "f". But the amount was still $0 in field "f". I need to have the results appear in this manner:

$100.00
+ $50.00
+ $10.00
= $160.00 Sub Total
+ $20.00
= $180.00 Total

What am I doing wrong?

maya_wf
Registered: Jan 4 2008
Posts: 3
Hi --

I also had something very similar that I was looking to do. I was looking through the Help file and found this solution:

* In the Script Editor, select Calculate from the Show list.

* In the Script Source field, type the following calculation:

For field_d add this script:

sum (field_a, field_b, field_c)

For field_e add this script:

sum(field_d, field_e)


Hope that helps :)
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
You may have a calculation order problem. So you either need to change the order of the calculations or perform the calculations in one location.

For the Calculate script for field_f you could enter:

field_d = sum(field_a, field_b, field_c)
sum(field_d, field_e)

George Kaiser

maya_wf
Registered: Jan 4 2008
Posts: 3
Thanks, I will try that and see if that works for me as well.