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

Simple calculation writing

cooleyce
Registered: Mar 14 2007
Posts: 4

Dimitri, Thanks for the response. I am still having problems in that our activity only buys from other companies. I checked out the sample form and have tried to use it as an example but the unit price (in the sample form) is tied to a part number the "company" sells, which means that the total price is also tied to the part number. Our purchase request needs to have the unit price entered by the requestor. How can I adjust the the "cost" fields to reflect a manually entered unit price?

My Product Information:
Acrobat Pro 7.0.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Calculations in LiveCycle forms are very simple. In fact it uses a Calculation language called FormCalc. So if you have 2 fields, one named "Price" and one named "Quantity", and the form fields are at the same hierarchy level, the calculation script would look like this.

Quantity * Price

That's it. FormCalc makes this very easy. Now if the Fields are at different places in the Form hierarchy there is a little more to the Field names. You can read all about it in this doc:

[url=http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf]http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf[/url]

There are plenty of other LiveCycle scripting docs at:

[url=http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=330467]http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=330467[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script