4 Replies Latest reply on Apr 20, 2017 6:03 AM by philmodjunk

    Number format

    TerryNorton

      Hello

       

      I want to be able to force users to enter a numeric value into a field, If i click 'Strict data type' it does not allow users to input decimals such as .25, is there a workaround for this?

        • 1. Re: Number format
          rgordon

          On my computer you can enter a decimal with a strict data type of numeric only.  FileMaker Pro 15.

          • 2. Re: Number format
            rgordon

            It does not pass the validation if you enter multiple periods like in an IP address.

            1 of 1 people found this helpful
            • 3. Re: Number format
              Menno

              If the decimal-sign on your computer is a comma: "," then you must be able to enter ",25" when the required data-type is number and strict, then ".25" (with a dot ".") will be rejected by the validation.

               

              I know of 2 easy work-arounds (there are surely more of them):

              1) In filemaker you can use a "OnObjectValidate" script-trigger on your entry-field to substitute the "." for a ",". Other script-triggers like "OnObjectKeystroke" could be used for that as well

              2) You could try to "tweak" your keyboard bij replacing the "." on your numeric-keyboard for a ",". On Windows I have used HotKeys (https://autohotkey.com) to achieve that.

              1 of 1 people found this helpful
              • 4. Re: Number format
                philmodjunk

                You can also remove the strict data type and use an auto-enter calculation to correct the data entry such as:

                 

                Filter ( Substitute ( Self ; "." ; "," ) ; -1,023456789 )

                 

                clear the "do not replace..." option .