### Title

Help trimming blank from phone number field

### Post

Hi,

I have an Auto-enter Calculation field for Phone number that looks like this

"(" & // start with an open paren sign

Left ( Filter ( Self; "0123456789" ); 3) & // fix the area code

") " & //finish area code with close paren sign and a space

Middle ( Filter (Self; "0123456789") ; 4; 3) & //fix the exchange

"-" & //insert a hyphen

Middle (Filter (Self; "0123456789" ); 7; 4) //the last 4 digits

If an operator just enters spaces I want to trim them so the field is blank again...I'm at a loss as how to do that. I've tied the trim function in a variety of ways but obviously am doing something wrong.

Any help would be greatly appreciated.

Let ( Digits = Filter ( Self ; 9876543210 ) ;

If ( Not IsEmpty ( Digits ; Your original calc goes here, but use Digits in place of fiter ( self ; ... )

) // let

You might find this thread of interest: Formatting a text as phone number