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

LiveCycle Simple Calculation

Delphine
Registered: May 1 2008
Posts: 10

I tried an easy calculation in my form.
Each time I have a message error "Qty "Fieldname"unknown"
What's wrong?

I have 2 steps in my form (Purchase Order Form):
1) Quantity (qty)*Price = calculation ok
2) Sum of all the lines
I do not know how to calculate the total sum

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
FormCalc provides a function called "Sum()" that can sum individual fields or an array of fields. The exact code depends on the layout and field names. So if you have the extension of the "qty" and "price" field into the "total" field for fields in the same subform and the form is not dynamic, the calculation for the "subtotal" field can be:

Sum(total[*])

Which is to say sum all the fields named 'total". You will not that capitalization and spelling of the field name is critical.

You can also create an example purchase order form from the supplied templates and review the scripts in the created form.

You can also look at the "Scripting Reference" provided under the "Help" menu option of LiveCycle Designer.

George Kaiser

Delphine
Registered: May 1 2008
Posts: 10
Thanks for your answer. I did what you said and I still have the message (Accessor....unknow).
My table is as follow. 7 columns and around 10 rows.

1) Quantity - Unit Price - Total
My first calculation is ok (Total: Sum(Quantity*UnitPrice)

The second calculation, to calculate all the total sums in the last column does not work at all.