3 Replies Latest reply on Feb 6, 2013 10:26 PM by radzmar

    Percentage Issues

    csb102155 Level 1

      Hi,  I continue to have problems with percentages.  How can I format a number field so that it writes a percent like 5.5 as 5.5%.   I've tried different methods and it goes all over the place.  Any assistance would be greatly appreciated.

       

      Connie

        • 1. Re: Percentage Issues
          radzmar Adobe Community Professional & MVP

          Hi,

           

          simply use the display pattern num{zz9.9 '%'}

          • 2. Re: Percentage Issues
            csb102155 Level 1

            I tried what you suggested in your message above, but it still comes out wrong.  5 x 1.0% should equal to 0.050 and it comes out as 5.  Can anyone help?

             

            Thanks

            Connie

            • 3. Re: Percentage Issues
              radzmar Adobe Community Professional & MVP

              Hi,

               

              did you write the % within the quotes?

              If not the pattern works differently. The percentage pattern only returns integers.

              But when you use quotes, then the % character is just a string attached to the formatted value.

               

              Examples:

              Pattern                         Entered Value            Displayed Value

              num{z,zzz,zz9%}         1                                   100%

              num{z,zzz,zz9%}         5.5                                550%

              num{z,zzz,zz9%}         0.5                                50%

              num{z,zzz,zz9%}         0.25                              25%

               

              num{z,zzz,zz9.88'%'}  1                                   1%

              num{z,zzz,zz9.88'%'}  5.5                                5,5%

              num{z,zzz,zz9.88'%'}  87                                 87%