4 Replies Latest reply on Aug 10, 2016 5:10 PM by CDAWN1976

    Cannot calculate percentage form in Acrobat DC

    CDAWN1976 Level 1

      I am trying to set up a simple form to run a bonus calculation. I have tried every sample Java code I could find to make it possible for users to enter a whole number in the Bonus Target Percentage field in the Personal Calculation Tool section without success. When I do that, none of the other calculations inputs correctly.

       

      I basically want to correct the Bonus Target Percentage form field to allow whole numbers if possible and I would like the Target Bonus (Step 2) and final Final Bonus fields (underneath the BONUS circle) to round up to whole dollar figures (without cents).

       

      Basically, the values in the Personal Calculation Tool section should compute similar to the Example Calculation section shown right above it.

       

      I have extremely limited knowledge of Java script. Hoping someone can help me, please.Thank you!Screen Shot 2016-08-10 at 11.42.07 AM.png

        • 2. Re: Cannot calculate percentage form in Acrobat DC
          gkaiseril MVP & Adobe Community Professional

          Nice pictures. You should have realized that the calculations do process images but fields. We need to know the field names, format etc. If there are many form field involved it would be nice to have a sample form with fields and your script. A percentage is obtained by performing division, the displayed value is achieved by setting the format.

           

          It also sounds like you need some help with rounding the actual result. How do you want he rounding performed?

          The results can be truncated, banker rounded, or raise to the next higher unit.

          1 person found this helpful
          • 3. Re: Cannot calculate percentage form in Acrobat DC
            CDAWN1976 Level 1

            Thanks for the tip gkaiseril.

             

            I can't seem to attach a sample PDF form, so details on form fields are below:

             

            The name of the form fields are (in order from top to bottom on the green table):

            Yes (format is none)

            SALARY GRADE MIDPOINT (format is a number with 2 decimal places and a currency symbol)

            BONUS TARGET PERCENT (format is a percentage with 2 decimal places)

            METRIC PERFORMANCE (format is none)

            PMP MULTIPLIER (format is none)

            PRORATION (format is none)

             

            The name of the form fields underneath the green table are:

            TargetBonus (Step 2) (format is number with 2 decimal places)

            METRIC PERFORMANCE (Step 3) (format is none)

            PMP MULTIPLIER (Step 4) (format is none)

            PRORATION (Step 5) (format is none)

            BONUS_TOTAL (final BONUS circle) (format is number with 2 decimal places)

             

            With regard to rounding numbers, I would like the dollar value in the final green bonus circle to round up to the nearest dollar figure without any cents. For example, if the calculation comes to $1,749.53 cents, I would like it to round up to $1,750.00.

             

            Thanks again for your input.

            • 4. Re: Cannot calculate percentage form in Acrobat DC
              CDAWN1976 Level 1

              Thanks for the tip gkaiseril.

               

              I can't seem to attach a sample PDF form, so details on form fields are below:

               

              The name of the form fields are (in order from top to bottom on the green table):

              Yes (format is none)

              SALARY GRADE MIDPOINT (format is a number with 2 decimal places and a currency symbol)

              BONUS TARGET PERCENT (format is a percentage with 2 decimal places)

              METRIC PERFORMANCE (format is none)

              PMP MULTIPLIER (format is none)

              PRORATION (format is none)

               

              The name of the form fields underneath the green table are:

              TargetBonus (Step 2) (format is number with 2 decimal places)

              METRIC PERFORMANCE (Step 3) (format is none)

              PMP MULTIPLIER (Step 4) (format is none)

              PRORATION (Step 5) (format is none)

              BONUS_TOTAL (final BONUS circle) (format is number with 2 decimal places)

               

              With regard to rounding numbers, I would like the dollar value in the final green bonus circle to round up to the nearest dollar figure without any cents. For example, if the calculation comes to $1,749.53 cents, I would like it to round up to $1,750.00.

               

              Thanks again for your input.