Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

format a field to display a telephone number

Featured Replies

I thought I heard FMP7 has the ability to automatically format a field to display a 13 digit number into a telephone number: 444444333 into (444) 444-3333. Does it work, or not? And how do you do it?

Thanks!!!

FileMaker Version: 7

Platform: Mac OS X Panther

The calculation field is utilized.

c_telephone_number -> Calculation[text] = Substitute( telephone number ; ["-" ; ""] ; ["(" ; ""] ; [")" ; ""] )

Please download and check a sample.

http://www.ne.jp/asahi/office/momo/upfiles/TelNo.ZIP

Field c_telephone_number is used when searching a telephone number.

Does it become helpful?

  • Newbies

In FMP7, you can use the Auto-Enter Calculated value and unchecked "Do not replace existing value of field (if any)".

Put his formula in Specify for PhoneNumber [text] =

"(" & Left(PhoneNumber;3) & ")" & Middle(PhoneNumber;4;3) & "-" & Right(PhoneNumber;4).

Hope it helps

Thank you for follow.

It seems that I understood on the contrary.

Here's the formula I use to format the field: PHONE

It works around users who may not enter all the numbers ro dashes, or leave off an area code, or leaves it as entered if they've entered an extension or something else:

Case(Length(GetAsNumber( PHONE )) =10 ; "(" & Left(GetAsNumber( PHONE ); 3) & ") " & Middle(GetAsNumber( PHONE ); 4; 3) & "-" & Right(GetAsNumber( PHONE ); 4) ; Length(GetAsNumber( PHONE )) = 7; "(_______) " & Left(GetAsNumber( PHONE );3) & "-" & Right(GetAsNumber(phone); 4) ; PHONE )

I know I could have elimiated all the "GetAsNumber" by using the new "Filter" funtion, but my fingers are so used to typing in FMP6!

Actually Bruce, rather than use the GetAsNumber( ) function *or* the filter function seven times, you'd have been better off using FileMaker 7's new Let( ) function, as it will result in a calc expression that will execute far more efficiently. Eg:

Let(X = GetAsNumber(Phone);

Case(Length(X) =10 ; "(" & Left(X; 3) & ") " & Middle(X; 4; 3) & "-" & Right(X; 4);

Length(X) = 7; "(___) " & Left(X);3) & "-" & Right(X; 4) ; Phone)

)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.