5 Replies Latest reply on Nov 3, 2011 1:27 PM by MikeF

    Percent formatting

    MikeF

      Title

      Percent formatting

      Post

      Formatted a number as Percent, but for, say, 90%. i have to type in ".9".

      Is there any way to make data entry  straightforward, in the above example I would just type in "90".

      Or do I have to make it a calculated field and divide Self by 100 ??

      Thanks,

       - Mike

        • 1. Re: Percent formatting
          philmodjunk

          If you type in ".2" how does the system know you want 2%, not 0.2%?

          An auto-entered calculation such as:

          IF ( Self > 1 ; Self / 100 ; Self )

          works, but you stil have to be careful whether 0.5 is supposed to be 50% or 0.5%.

          • 2. Re: Percent formatting
            MikeF

             Phil,

            Understood and agreed re the decimal issue.

            However, put your calc in that field and now it's "not modifiable".  As in ... can't type *anything* in it.

            Shouldn't it automatically divide by 100 if the field is formatted to Percent? [Holding back from the Access comparison here..! <g>].

            Have I done something incorrectly, or am I stuck with using the ".9" method??

            Thanks,

              - Mike

             

             

            • 3. Re: Percent formatting
              philmodjunk

              It is modifiable if you use it as an auto-entered calculation. This is a field of type number with the calculation specified on the auto-enter tab in the field options dialog. You also have to clear the "do not replace existing value" option.

              Don't be afraid to hold back on the Access comparisons. I speak "Access" too and won't hesitate to "translate" an Access method into the FileMaker equivalent if one exists.

              It's also possible to use script triggers to run a script for this (could check for the % character and format differently based on the presence or absence of that character), but that's usually overkill for this issue.

              And I remember having the same issue in Access when I entered 10 on an Access form and got 1000% instead of 10% if I didn't type in 0.1...

              • 4. Re: Percent formatting
                mgores

                I've noticed this issue also when you set the Data Formatting in the inspector to Percent.  To get the field to display as 90%  you have to type in .9

                To me it made more sense to be able to enter 90, have it display as 90 and then had any calculations divide by 100.

                • 5. Re: Percent formatting
                  MikeF

                   Ok, that worked.

                  Thanx.

                  I remember this being an issue in Access a long time ago, but now -- since at least Access 2007 -- if you format a field as % it automatically does the /100 for you on entering data.