Skip navigation
a.n.bentz
Currently Being Moderated

Custom Calculation for two percentage fields

Aug 8, 2012 5:34 AM

Hello

 

Right off the bat, thank you for taking the time to read my question. I am creating a form that is fillable and calculable within Adobe X Standard. I have two fields that are percentages. Adobe's percentage standard is to multiple whatever number you put into the field by 100 and make that the percentage. I wrote a custom script to divide the number by 100, so if I want 1% I can put 1 in the field instead of 0.01. However, I have two of these fields, and now when I put 1% in the first field and then 2% in the second field, it divides the first field by 100 again so that it reads 0.01%.

 

This is the formula I'm using to divide the value by 100:

if(event.value)event.value /=100;

 

This script is in both boxes, which I have labeled as V3 and V12. Do I need to get more specific with the script? Is there a way to keep the value of V12 from affecting the value of V3 and vice versa?

 

Please help. :-)

 

Thank you,

Amanda

 
Replies
  • Currently Being Moderated
    Aug 8, 2012 8:51 AM   in reply to a.n.bentz

    You do realize that Acrobat updates all calculations when a field used in a calculation is updated. You should be aware that for the "Percentage" format is used the value of the field is the decimal value, like 0.01, and the display is formatted to show the decimal as a percentage, 1%.

     

    I would just learn to live with the way Acrobat/Reader works, unless you want to write more JavaScript.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points