4 Replies Latest reply on Apr 20, 2017 1:20 PM by DavidJondreau

    Field Calculation


      I have a number field that is defined (Formated) as Decimal with 2 decimal places.


      My issue or problem is that this number field displays a calculated value with 8 or more decimal places.


      I have verified that there is no problem with the calculation script steps.

        • 1. Re: Field Calculation

          There are no script steps in a calculation.


          What is the question?

          • 2. Re: Field Calculation

            Using the inspector to format how a field displays does not change the value of the field. The same field can even display different numbers of decimal places on different layouts. If you click into the field, you see the unformatted value. This is expected behavior in FileMaker.


            You'd need to use a calculation using something such as the round function to actually change the value of the field to a specific number of decimal places.

            1 of 1 people found this helpful
            • 3. Re: Field Calculation

              I’m also confused by the terminology you’re using. What is the field type: text, number, etc.? Where is the calculation: in the Auto-Entry dialog, in the Calculation definition, in a script, etc.? This sounds like it’s probably a simple issue, but we need to have a little better idea of how the calculation works.



              • 4. Re: Field Calculation

                There's how data is stored in FileMaker and how data is displayed. Your numbers are being stored with as many decimal places as the calculation requires. You've set the display for round that to 2 places, but that display doesn't work when a user enters the field.


                You can have filemaker store the data rounded to two places by changing your number field's definition and adding an auto-enter calculation = Round ( self ; 2 ) and checking Always replace.

                1 of 1 people found this helpful