brian.curran

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

Discussion created by brian.curran on May 17, 2013
Latest reply on May 17, 2013 by 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.

Outcomes