8 Replies Latest reply on May 25, 2009 4:54 PM by jferg

    input mask

    jferg

      Title

      input mask

      Post

      Hi

       

      I am new to FMP 10 from Access.

       

      How do I do the equivalent of an input mask for a field so data entered must be in the form: single cap letter then 7 numbers eg A0000001 , it is a unique identifier

       

      Thanks

       

      jferg

        • 1. Re: input mask
          kapitaen_1
            

          when you define the fields of you data table, you can enter some check conditions. Either by some pre-defined conditions, or you can enter a formula that cheks length, first character, next seven charcters. And then this formula tells ok or not ok.

           

          greetings from germany

          Chris 

          • 2. Re: input mask
            jferg
              

            Hi Chris,

             

            Thanks

             

            Could you be a bit more specific or give an example for A0000001   Like how do  I force first character to be single cap?   I have set validation to: Char ( 8 )

             

            thanks again

             

            jferg

            • 3. Re: input mask
              kapitaen_1
                
              you have to repeat the last if for all 7 num characters and to complete the abc characters.
               
              Wenn ( Länge ( meinfeld ) = 8; 
                Wenn ( länge (FilterZeichen ( ZeichenMitte ( meinfeld ; 1; 1); "abcdefghij")) > 0; 1; 0) UND 
                Wenn ( länge (FilterZeichen ( ZeichenMitte ( meinfeld ; 2; 1); "0123456789"> 0; 1; 0) UND 
                Wenn ( länge (FilterZeichen ( ZeichenMitte ( meinfeld ; 3; 1); "0123456789"> 0; 1; 0)
                ; 0)
               
               
              greetings from germany 
              • 4. Re: input mask
                raybaudi
                  

                jferg wrote:

                 

                it is a unique identifier


                Hi jferg

                 

                it's better leave the creation of unique identifiers to FileMaker.

                 

                If the first letter is always "A" you can set the field to auto-enter a serial number starting from A0000001 step 1


                • 5. Re: input mask
                  jferg
                    

                   

                  Thanks for the string but can't get it to work - may be my English translation.

                   

                  The unique identifier is generated by the hospital wide demographics database and is unique for each patient - It is already assigned to a patient by the time I deal with them so cannot generate it in FMP.

                   

                  jferg

                   

                  • 6. Re: input mask
                    comment_1
                      

                    Try validating the field by calculation =

                     

                    Let ( [
                    char1 = Left ( Self ; 1 )
                    ] ;
                    not IsEmpty ( Filter ( char1 ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) )
                    and
                    Exact ( SerialIncrement ( char1 & "0000000" ;  Self ) ; Self )
                    )


                    • 7. Re: input mask
                      jferg
                        

                      Just to add the first charachter can be A to Z , the next 7 are numbers. eg B1234567 or C5763988

                       

                      In access you just put an input mask in the form L0000000  seems FMP doesn't have an option like that

                       

                      jferg

                      • 8. Re: input mask
                        jferg
                          

                        Thanks heeps

                         

                        "comment"

                         

                        That works

                         

                        jferg