Domino Code Fragment

Code Name*
PhoneNumber format
Date*
02/13/1999
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.13.59.130.130
Description*
Auto formats US numbers if user does not
Type*
Formula
Categories*
User Interface (Notes), User Interface (Web)
Implementation:
Modify constants
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
PhoneNbr := CustomerPhone1;
FIELD CustomerPhone1 := CustomerPhone1;
Len := @Length(PhoneNbr);
newPhone := @If(Len = 7 ;
           @Left(PhoneNbr ; 3) + "-" + @Right(PhoneNbr ; 4);
            len = 10;
                 "(" + @Left(PhoneNbr ; 3) + ") " + @Middle(PhoneNbr ; 3 ; 3 ) + "-" +
                 @Right(PhoneNbr ; 4) ;
            PhoneNbr)  ;
newPhone