AnsweredAssumed Answered

Formatting Phone number

Question asked by JohnBuono on Nov 16, 2013
Latest reply on Nov 16, 2013 by JohnBuono

Title

Formatting Phone number

Post

     I tried to format a phone number using 

     Creating a Data Input Mask for Formatting Telephone Numbers

     This is what I used

      

              
  •                
    PhoneNumber (Text) [Set the validation to numeric only, with the max number of characters being set to 10]  Deselect "Allow user to override data in this field"
              
  •           
  •                
    Masking (Calculation: Text) [Make sure to uncheck the field that states “Do not evaluate if all referenced fields are empty] 
              
  •      
          

               Set the calculation equal to:

               Choose(Length(PhoneNumber);
               "(###)###-####";
               "("&PhoneNumber&"##)###-####";
               "("&PhoneNumber&"#)###-####";
               "("&PhoneNumber&")###-####";
               "("&Left(PhoneNumber;3)&")"&Middle(PhoneNumber;4;1)&"##-####";
               "("&Left(PhoneNumber;3)&")"&Middle(PhoneNumber;4;2)&"#-####";
               "("&Left(PhoneNumber;3)&")"&Middle(PhoneNumber;4;3)&"-####";
               "("&Left(PhoneNumber;3)&")"&Middle(PhoneNumber;4;3)&"-"&Middle(PhoneNumber;7;1)&"###";
               "("&Left(PhoneNumber;3)&")"&Middle(PhoneNumber;4;3)&"-"&Middle(PhoneNumber;7;2)&"##";
               "("&Left(PhoneNumber;3)&")"&Middle(PhoneNumber;4;3)&"-"&Middle(PhoneNumber;7;3)&"#";
               "("&Left(PhoneNumber;3)&")"&Middl

     

     and it does nothing.  I copied and pasted the example, but when I input a phone number nothing happens.  Any idea what I am doing wrong? I followed the instruction exactly.  At least I thought I did.

Outcomes