Ask a Question related to Adobe Acrobat Macintosh, Design and Development.
-
sander_wessel@adobeforums.com #1
How to subtract in a calculation in Acrobat Pro 9
I'm building a pdf with some calculations. I can do a 'sum, product,average,minimum,maximum'. But how do i subtract 2 fields?
sander_wessel@adobeforums.com Guest
-
serious acrobat 8 calculation error
anyone else having trouble with resetting the order of calculations in acrobat 8.0.0? it does not stick for me at all. i set the order, then hit ok.... -
Calculation
Hi, I'm trying to take data from my database and add them (like field 1 + field 2). Somehow, it doesn't seem to be working. Anybody would know a... -
Calculation based on calculation
I'm new to Acrobat 5.05 and Javascript... I have a simple issue/question: There are 3 columns, QUANTITY, EACHES COST, LINE TOTAL As the... -
Doing a simple calculation?
Hi - I would like to multiply a number by another number that is entered by the user. I have made a non-working example.... -
Calculation Help
Hi there, Here's what I am trying to do: I have two fields on a form. One for Estimated $ and one for Acutal $. I would like to do this: If the... -
George_Johnson@adobeforums.com #2
Re: How to subtract in a calculation in Acrobat Pro 9
You will need to use JavaScript in a field's custom calculation script. For example:
// Get first field value
var v1 = getField("Text1").value;
// Get second field value
var v2 = getField("Text2").value;
// Set this field value equal to the difference
event.value = v1 - v2;
You would replace "Text1" and "Text2" with the names of the fields you've set up.
George
George_Johnson@adobeforums.com Guest
-
George_Johnson@adobeforums.com #3
Re: How to subtract in a calculation in Acrobat Pro 9
I should not have said you *need* to use JavaScript, because you can also use the "simplified field notation" option, but as you come to do more than the simplest of calculations, JavaScript is what you'll need.
If you want to use the simplified field notation option, you'd enter:
Text1 - Text2
but you'd replace Text1 and Text2 above with the names of your fields.
George
George_Johnson@adobeforums.com Guest
-
sander_wessel@adobeforums.com #4
Re: How to subtract in a calculation in Acrobat Pro 9
your the best, gonna try it out!
sander_wessel@adobeforums.com Guest
-
sander_wessel@adobeforums.com #5
Re: How to subtract in a calculation in Acrobat Pro 9
works!
sander_wessel@adobeforums.com Guest
-
Unregistered #6
How to subtract in a calculation in Acrobat Pro 9
Is there something that I can add to this that would not print a '0' in the field if both text1 and text2 don't have any data entered in them?
Thanks!
You will need to use JavaScript in a field's custom calculation script. For example:
// Get first field value
var v1 = getField("Text1").value;
// Get second field value
var v2 = getField("Text2").value;
// Set this field value equal to the difference
event.value = v1 - v2;
You would replace "Text1" and "Text2" with the names of the fields you've set up.Unregistered Guest



Reply With Quote

