6 Replies Latest reply on Mar 11, 2013 7:58 AM by stephieo_dn3

# Help with simple Acrobat calculations!

I hope someone can help! I am trying to do some simple calculations in Acrobat and am totally lost! I need to subtract one field (mileage input) from another field (mileage output), then multiply it by 52.

So someone can fill in the field "mileage input" and fill in the field "mileage output" and the third field would populate with the answer to this equation: "mileage input" - "mileage output" x 52.

My boss is breathing down my neck and I'm having a hard time with this javascript. Any help would be awesome!

• ###### 1. Re: Help with simple Acrobat calculations!

Use this code as the custom calculation script of your text field:

event.value = (+this.getField("mileage input").value - +this.getField("mileage output").value) * 52;

• ###### 2. Re: Help with simple Acrobat calculations!

That worked! Thank you! I hope you can help me again. I need to then take that answer from the equation you just helped me with and multiply it by .55. How do I do that?

• ###### 3. Re: Help with simple Acrobat calculations!

In the same field, or do you mean that you want another field to equal 0.55 of this field?

• ###### 4. Re: Help with simple Acrobat calculations!

In another field. But, I figured it out thanks to your help to my first question. You rock!

• ###### 5. Re: Help with simple Acrobat calculations!

Just make sure the field calculation order is correct, or you'll get weird

results...

• ###### 6. Re: Help with simple Acrobat calculations!

Thanks for the tip!