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

more than one calculation in form field

amgine
Registered: Apr 14 2011
Posts: 2
Answered

Hi, I'm trying to put more than one calculation into a form field. Can I do that?
 
Basically:
field_A * 65 + 10% of field_B = answer in field_C
 
Hope that makes sense. Is it possible? Does anyone know the text I should use?
 
All I can get it to do is multiply by the 65 and give me a price in field_C. But I want it to add 10% of another field too.
 
Using Acrobat Pro 9 on Mac SnowLeopard

My Product Information:
Acrobat Pro 9.3, Macintosh
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
Accepted Answer
Yes, but you will need to write a custom calculation script in Acrobat JavaScript.

but your formula looks like it calculates only one value from the value of 2 different fields and two constants.

You could use the simplified field notation for 'field_C':

(field_A * 65) + (0.10 * field_B)


George Kaiser

amgine
Registered: Apr 14 2011
Posts: 2
Thank you, gkaiseril, the first part works very nicely on its own (field_A*65) takes the number in field_A and multiplies it by 65. But it doesn't seem to like the extra +(0.10*field_B)

(scratches head)

I've had another look at my field_C and it seems I was being very dim about how that was put together. I'd copied field_B along with its full sum (adding together seven other fields). I've now renamed it and asked it to include the final sum from field_B and not its calculation (iyswIm). Now your calculation works fine!

Thanks again.