2 Replies Latest reply on May 9, 2013 1:32 PM by hrcap

    Postcode change colour if to many or to few digits

    hrcap

      Title

      Postcode change colour if to many or to few digits

      Post

           Evening All

            

           I have made a script that gets a UK postcode into the correct format:

            

            

           Let(
            
           @Postcode = TextFormatRemove(Substitute(Self; " " ; "" )) ;
            
            
           Case(
            
           Length(@Postcode) = 6 ;
            
           Upper(Replace(@Postcode; 4 ; 0 ; " " ) ) ;
            
           Upper(Replace(@Postcode; 5 ; 0 ; " ") )
            
           )
            
           )
            
            
           I would like to make the postcode change to red if it has fewer than 6 characters or more than 7 characters using the script 
            
           TextColor(Self; RGB(255; 0; 0))
            
           but i cannot work out how to get this to work.
            
            
           Your help would be appreciated.
            
           Many Thanks
            
           Hadleigh