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

Simple Calculation Scripts

AndreaR
Registered: Aug 20 2010
Posts: 7

I am new to Adobe and creation of forms and I am just looking to create a calculation for the following scenario:

I am creating a sales commission form and i have the following text boxes:

Total Commission to be paid [________] --> this value will be entered

Payable on Firm [________] --> I want this to be calculated as (total commission to be paid / 2)

Payable on Close [_________]--> I want this to be calculated as (total commission to be paid / 2)

I know how to create a calculation when doing the product of two text boxes, but when i need to just calculate a text box by a specific numeric value I am lost as to how this script would look. I have other forms under construction with similar scripts needed ie. pricing with a subtotal that must be multiplied by HST (0.13) to get a total etc.

Any help would be greatly appreciated.

Thanks

My Product Information:
Acrobat Pro 9.3.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Use the Simple Notation option.
Just enter the field's name (it must not have spaces, dots, or any other special characters in it), followed by the rest of the formula. So if the field's name is TotalCommission, enter:
TotalCommission / 2

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

AndreaR
Registered: Aug 20 2010
Posts: 7
I have entered this formula, but when i test it out and enter a value in the TotalCommission box, it doesn't automatically calculate a value for the payable text boxes where i had specified the calculation
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Make sure that you used exactly the same name, including case.

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

AndreaR
Registered: Aug 20 2010
Posts: 7
Yes I did
Am I supposed to use an equals sign or anything prior to the formula?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
No. Maybe you could share you file with us? Like on acrobat.com or rapidshare.com.

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

AndreaR
Registered: Aug 20 2010
Posts: 7
I emailed you the two files i've been working on. I wasn't sure how to share the file the way you had suggested.

Thank you so much for your help!!

Andrea
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
try67 wrote:
Make sure that you used exactly the same name, including case.
And : no space and only ASCII characters in fields' names.

;-)
KingHarold
Registered: Dec 6 2010
Posts: 1
Hi I need help creating a script that calculates mileage on my form

Mileage = milesin - milesout


Thanks
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Under the Mileage field's properties, Calculate tab, enter this as the Simple Notation Script:
milesin - milesout

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