AnsweredAssumed Answered

International phone number formating...

Question asked by Rackman on Dec 20, 2008
Latest reply on Jan 5, 2009 by Rackman

Title

International phone number formating...

Post

Hello again,

 

I'm using the following field calc I found in the FMP help section to format phone numbers...

 

If(Length(Phone Main) < 9; Left(Phone Main;3) & "-" & Right(Phone Main;4);

If(Length(Phone Main)=10; "(" & Left(Phone Main;3) & ") " & Middle(Phone Main; 4; 3) & "-" & Right(Phone Main;4);

If(Length(Phone Main)=12; "(" & Left(Phone Main;3) & ") " & Middle(Phone Main; 5; 3) & "-" & Right(Phone Main;4);

If(Length(Phone Main)=14; Phone Main; "error"))))

 

The problem is the Phone Main field can contain both US phone numbers and international phone numbers such as 00-44-123-123-4567.

 

I can't figure out how to add formating for international numbers to the above calculation.

 

Any help would be appreciated.

 

Thank you again,

 

Joe 

Outcomes