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.

Auto Formatting Entry upon Tab Out

Featured Replies

  • Newbies

I would like to permit the data entry of text , such as entering a telephone number, to not worry about the formatting but be formatted upon tabbing out of the field. For example, enter a phone number as 6107679560, and have the field format upon tabbing out of the field to (610) 767-9560. Over the years I have used other databases to do this with placeholders, but cannot find a way to do it in Filemaker 7.

Any advice?

This problem has been discussed here many times. Here's the solution:

Let(Phone = Filter(Phone;"0123456789");"(" & Left(Phone;3) &

")" & " " & Middle(Phone;4;3) & "-" & Middle(Phone;7;4))

If you want to trap the wrong number of digits:

Let ( phoneHome = Filter ( phoneHome ; "0123456789" ) ;

Choose (Length ( phoneHome );

"Too few digits"; /* 0 result */

"Too few digits"; /* 1 result */

"Too few digits"; /* 2 result */

"Too few digits"; /* 3 result */

"Too few digits"; /* 4 result */

"Too few digits"; /* 5 result */

"Too few digits"; /* 6 result */

"Too few digits"; /* 7 result */

"Too few digits"; /* 8 result */

"Too few digits"; /* 9 result */

"(" & Left ( phoneHome ; 3) &

")" & " " & Middle ( phoneHome ;4 ;3 ) & "-" & Middle ( phoneHome ; 7 ; 4 )))

If you want to trap the wrong number of digits:

Let ( phoneHome = Filter ( phoneHome ; "0123456789" ) ;

Choose (Length ( phoneHome );

"Too few digits"; /* 0 result */

"Too few digits"; /* 1 result */

"Too few digits"; /* 2 result */

"Too few digits"; /* 3 result */

"Too few digits"; /* 4 result */

"Too few digits"; /* 5 result */

"Too few digits"; /* 6 result */

"Too few digits"; /* 7 result */

"Too few digits"; /* 8 result */

"Too few digits"; /* 9 result */

"(" & Left ( phoneHome ; 3) &

")" & " " & Middle ( phoneHome ;4 ;3 ) & "-" & Middle ( phoneHome ; 7 ; 4 )))

Probably better to leave the existing number in place and change the color rather than use "Too few digits". It makes it easier for the user to correct it.

Here's a nice custom function that does this:

http://www.briandunning.com/filemaker-custom-functions/detail.php?fn_id=41

If you don't have Developer, you can use the text of this function in a regular calc (with slight modification.) This is nice because it also handles numbers preceeded by a 1, and extensions after the number (x1234).

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.