2 Replies Latest reply on Jul 3, 2013 4:08 AM by jlsdesign

    Is there a simple way to create an Input Mask?

    jlsdesign

      Hi, I have read thru Help screens etc plus viewed several tutorials on line plus reading thru' The Missing Manual for FMP12 in an effort to identify a method of creating an input mask as per MS Access.

      The purpose is create specific layout of data in fields such as Telephone No's / Bank Acc No / Credit Card No etc. Example of telephone mask is "(xxx) xxxx xxxx" where the parenthesis and spaces are automatically applied.

      I have very little experience with FMP but I am excited about the potential especially when compared to MS Access 2010.

      Any help to point me the right direction would be appreciated.

        • 1. Re: Is there a simple way to create an Input Mask?
          brian.curran

          I have this set up for a Sort Code field, we type 123456 into the field and it's formatted at 12-34-56

          It's self explanatory and easy to amend for phone numbers, credit card numbers etc.

           

          Add a 'Text' field to your table and call it SortCode or whatever you prefer. Double click the field or hit the "Options" button.

          On the "Auto-Enter" tab, click the "Calculated value" check box then copy and paste the text shown below:

           

          Let ( digits = Filter ( Self ; "0123456789" ) ; /*excludes all other characters*/

          Case

          ( Length ( digits ) = 6 ; Left ( digits ; 2 ) & "-" & Middle ( digits ; 3 ; 2 ) & "-" & Right ( digits ; 2 )

          /* sort code */ ;

          Self /* error, don't modify user input */

          ) /* ends case */

          ) /* ends let */

           

          Yes, MS Access made this task very simple and there are one or two other things that FM should have as standard but the trade off is definitely worth it...

           

          Brian.

          1 of 1 people found this helpful
          • 2. Re: Is there a simple way to create an Input Mask?
            jlsdesign

            Thanks for the advice - I'll give this a whirl