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

How to calculate multilple cells in a form

sburyska
Registered: Mar 26 2009
Posts: 13
Answered

I have some text fields in a form that I want to do a simple calculation like (Field1 * Fieild2 + Field3)
I'm assuming I would use the Custom Calculation Script editor in the Calculate section of the Text Field Propeties section but I don't know any Java. How would I make this simple calculation?

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Just use the Simple Field Notation section and enter the forumla exactly like you wrote it here (the field names may not contain spaces or periods, though).

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

sburyska
Registered: Mar 26 2009
Posts: 13
Thanks, I gave it a try and it did not calcualte using the Simplified field notation section. My syntax is as follows: 1a-30a where 1a (sales price) and 30a (total selling expenses) are field names. I have also tried: BrokerageComm*1a+395 where BrokerageComm is a field name x field 1a (sales price) plus $395 and that does not work either
try67
Expert
Registered: Oct 30 2008
Posts: 2398
What do you mean by "does not work"? Do you get any errors? Does the value of the fields change?
Maybe you should post your file so we could have a look for ourselves.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

sburyska
Registered: Mar 26 2009
Posts: 13
Actually nothing happens. No errors, no change in value, nothing. I would be happy to post the file. I just need to know how to do that.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Upload it to acrobat.com or rapidshare.com and post the link here.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

sburyska
Registered: Mar 26 2009
Posts: 13
Here is the rapidshare link:

http://rapidshare.com/files/393675292/Estimates_of_Proceeds_2.pdf.php

I'm just need a couple simple calculations one is for line 32 which is Line 1 minus line 31 and the other is a calculation for line nine which needs to be BrokerComm * Line 1 plus $395

Thanks much for your help!
try67
Expert
Registered: Oct 30 2008
Posts: 2398
You have plenty of errors in other scripts.
Under Edit - Preferences - JavaScript, tick Show console on errors and messages, and you'll see them.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Simplified Field Notation has a large number of restrictions starting with field names. Since Acrobat needs to make an assumption about the data entered is a field name or number all field names need to begin with an alphabetic character. Also one needs to be careful about using the division operator so there is not division by zero. You can not use any field properties, methods, objects, functions, etc.

George Kaiser

sburyska
Registered: Mar 26 2009
Posts: 13
Thanks, Do you know of any services that I can get this file cleaned up and working properly?