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.

Formatting Phone Number Field

Featured Replies

  • Newbies

I'm porting our Access DB into FileMaker 7 and was surprised that things I took for granted in Access or Excel don't seem to be available in FM. Of course this could all be operator error but I can't seem to find the answer on my own. Right now I woud like to dfine a format mask for the phone number fields. In Access a number field can have a phone number mask applied. Is this possible in FMP? Any help that you can give me will be greatly appreciated.

In FMP7 you can do this by an auto-enter by calculation. Look at Business tracker it has a very good example of phone number formating.

From the help file (on the subject 'Filter')

The following example removes all text from the provided data, then formats the remaining numbers in the preferred phone number formatting:

Let(phone = filter(theField;"0123456789");"(" & left(phone;3) &

")" & middle(phone;4;3) & "-" & middle(phone;7;4))

If theField contains Work: 408.555.1212 this calculation returns (408)555-1212.

Anything wrong with the calculation

"(" &

Left(GetAsNumber(Phone);3) &

")" &

Middle(GetAsNumber(Phone);4;3)&

"-"&

Right(GetAsNumber(Phone);4

I guess I haven't grasped the Let calculation yet.

GetAsNumber won't remove a leading hyphen or the first decimal point and won't account for leading zeroes.

  • Author
  • Newbies

Thanks for your input. I can see that I have a great deal to learn. FMP is not as simple as I thought. Can anyone recommend a good reference? Thanks

I know this sounds silly, but there really is a lot of good information in the white pages on the filemaker website ... and it's free.

Given that you're coming to FileMaker from MS Access, I assume that you've got some foundation in relational theory (normalization, relational operations, etc.) and perhaps even a bit of Visual Basic programming experience under your belt. If so, you'll want a reference that hits on enough FM basics to get you up to speed with FM's unique personality, then quickly moves into more advanced areas, such as complex calculations (such as would be used to format a phone number) and scripting. The book I'd recommend is:

Lane, S., B. Bowers, S. Love, and C. Moyer. 2005. Special Edition Using FileMaker 7. Que Publishing, Indianapolis, IN.

At 1100 pages, it's fairly hefty, but there's little wasted ink inside. Particularly useful are the appendices providing complete references to FM's script steps and native functions. For what you get, $45 is practically a bargain price these days, too. My only complaint was that the first quarter of the book rehashes FM basics before moving into Intermediate/Advanced territory, but that may be just what you need to help you get up to speed. Oh, one other complaint I had was that their data modelling chapter left out a formal discussion of the normal forms (1NF - 5NF), but if you've already been exposed to that, then you won't miss it here.

Their booth was next to the FM Forums booth at Devcon 2004. Bought one over the back fence, so to speak. Great book! A lot of good information for FM users of all levels. Lots of pages but no fluff.

-bd

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.