Phone field formatting
might be a silly question. Is there a way to format a field to show phone number is a (xxx)xxx-xxxx format automatically as you input the numbers???
The Above requires FMP 10 Advanced, apparently.
PhoneNumber: TextIn Options, click on Calculated Value and enter the following calculation.Let(Phone = Filter(Phone;"0123456789");"(" & Left(Phone;3) &") " & Middle(Phone;4;3) & "-" &; Middle(Phone;7;4))
This assumes the correct number of US phone numbers is added (10 digits)
See this example.
thanks davidanders! I just did as you said and it worked perfectly.... the only thing is that i had to remove the last semi colon from the formula just after the last & and it worked perfectly :) (and I just did that because fm wouldn't let me press ok with it there since it would give an instruction that something more was expected theer is the semicolon was there)...
This: (Let(phone = Filter(Home Phone;"0123456789");"(" & Left(phone;3) & ") " & Middle(phone;4;3) & "-" & Middle(phone;7;4)) works like a charm, thanks!
I'm wondering how to ALSO make the text formatting conform to the value of the field.. i.e. if I cut and paste a phone number out of a document that is in Times New Roman 14, and I want it to default it to Arial 11 when I paste the number into the field, how do I do that?
I know you can use the script 'TextFormatRemove ( Self )', in the "Specify Calculation" dialog box, but how do I add this script to (Let(phone = Filter(Home Phone;"0123456789");"(" & Left(phone;3) & ") " & Middle(phone;4;3) & "-" & Middle(phone;7;4)) so they both work together????
I'm new to writing scripts, bear with me!
Retrieving data ...