AnsweredAssumed Answered

Creating a data input mask for formatting telephone numbers

Question asked by zmabney on Apr 16, 2016
Latest reply on Apr 18, 2016 by beverly

The KB recommends using this technique to create a data input mask for formatting telephone numbers.

URL:

Creating a data input mask for formatting telephone numbers | FileMaker

 

Wouldn't this work as well?

A Calculated Value: L_Insurance Phone Number

Let(

Digits = Filter(L_Insurance Phone Number; "0123456789");

 

Case (

GetAsNumber ( L_Insurance Phone Number ) < 10000 ;

Right(Digits; 4) ;

 

GetAsNumber ( L_Insurance Phone Number ) < 10000000 ;

Middle(Digits; 1; 3) &

"-" & Right(Digits; 4) ;

 

GetAsNumber ( L_Insurance Phone Number ) < 10000000000 ;

"(" & Left(Digits; 3) & ") " & Middle(Digits; 4; 3) &

"-" & Right(Digits; 4) ;

 

GetAsNumber ( L_Insurance Phone Number ) < 100000000000 ;

"+" & Left(Digits; 1) & " (" & Middle(Digits; 2; 3) & ") " &

Middle(Digits; 5; 3) & "-" & Right(Digits; 4) ;

 

 

"Invalid"

)

)

Outcomes