I have a nifty auto-enter calculation that imposes our preferred formatting upon phone numbers -- it looks like this:

Let (

[@Phone = Self;

@Numbers = Filter(@Phone; "+1234567890")];

Left(@Numbers; 3) & "." &

Middle(@Numbers; 4; 3) & "." &

Right(@Numbers; 4)

)

It works great for U.S. phone numbers; international numbers...not so. The presence of more than 10 digits makes it go haywire, and my brain gets fried when I try to think of how I could accommodate for this occurrence.

If an international number comes to me like this:

+32470854343

I want it to auto-format to

+32.470.854343

But adding extra numbers to the Right function then louses up domestic numbers. I will be grateful for any thoughts...

Insert period at 4th and 8th position.

Let (

[@Phone = Self;

@Numbers = Filter(@Phone; "+1234567890");

@Numbers = Replace ( @Numbers ; 4 ; 0 ; "." );

@Numbers = Replace ( @Numbers ; 8 ; 0 ; "." )];

@Numbers

)