5 Replies Latest reply on May 17, 2013 1:58 PM by brian.curran

    Force CAPS and format spacing at the same time...

    brian.curran

      Hi,

      I have the following Auto-Enter calc' to format UK National Insurance numbers into the correct format (E.g. AB 12 34 56 Z)

       

      Let ( digits = Filter ( Self ;

      "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) ; /*excludes all other characters*/

      Case

      ( Length ( digits ) = 9 ; Left ( digits ; 2 ) & " " & Middle ( digits ; 3 ; 2 ) & " " & Middle ( digits ; 5 ; 2 ) & " " & Middle ( digits ; 7 ; 2 ) & " " & Right ( digits ; 1 ) /* NI No. */ ;

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

      ) /* ends case */

      ) /* ends let */

       

      This works if I type in CAPS but not in lowercase letters. What would be the best way to force CAPS even if the user doesn't use them?

       

      Thanks

      Brian.