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

Help with simple division calcualation in form

grlintheworld
Registered: Dec 21 2009
Posts: 66
Answered

It's so simple, yet I can make it work. I have a text field that is called "project total" that is the sum of a bunch of fields above it. Easy. What I need to do now, is have a text field below it that is exactly half of what that "project total" ends up to be.

I've tried (project total)/2
I've tried project total/2
I've tried projecttotal/2
and I've tried all of the above but substituted *.5 instead of the /2

and nothing seems to work. Please help! This is driving me insane. It seems like it should be easier than this...

(I'm using Acrobat Pro 9, and I'm on a Mac, if this helps).

My Product Information:
Acrobat Pro 9.2, Macintosh
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Since you have placed a space in the field name, you need to use the "Custom" script option.
var Total = this.getField('Project Total').value; // get project total valueevent.value = Total / 2; // divide by 2

George Kaiser

grlintheworld
Registered: Dec 21 2009
Posts: 66
thank you - I will try this!