1 Reply Latest reply on May 22, 2013 8:54 AM by philmodjunk

    Auto-enter calculation or validation in find mode

    EvanStein

      Title

      Auto-enter calculation or validation in find mode

      Post

           Good evening everyone.

           I've designed a database with a field for MAC addresses that validates an entered MAC address as XX:XX:XX:XX:XX:XX with any letters CAPITAL.  The auto enter calculation is:

            

           Let ([
           v = Filter ( Upper ( Self ) ; "1234567890ABCDEF" ) ;
           sep = ":"
           ];
           Case ( Length ( v ) = 12 ; 
           Replace ( Replace ( Replace ( Replace ( Replace ( v ; 3 ; 0 ; sep ) ;  6 ; 0 ; sep ) ; 9 ; 0 ; sep ) ; 12 ; 0 ; sep ) ; 15 ; 0 ; sep )
           )
           )
            
           The trouble is that when I scan a MAC address barcode to look it up in find mode, there aren't any colin's in the string of numbers entered.  We know that the MAC address scanned is "valid", but we need to enter colins every two characters, or else the find turns up no records.
            
           Is there a way to validate (or modify) this MAC field entry prior to executing the find?
            
           Thanks for any insight you might have!
            
           Evan