Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7032 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Can anyone point me where I can find such a calc?

There has to one out there...this is such a common tool for DB's...I don't know why FM just doesn't provide it...

Edited by Guest
Posted

This topic has been discussed a few times in the past.

I did a search for "Area Code" and it returned this recent post among the 64 hits , Click Here

I'm sure if you use "Zip Code" you would get a lot more hits.

HTH

Lee

:cool:

Posted

OK, I have explored a solution but can't get it to work...

I have broken it down to creating two new calculations:

1) Create a calc field called "EXTRACT AREA CODE"

Middle(Main Phone;Position(Main Phone;" ";1;1)+1;3)

This baby goes out and extracts the first three numbers (area code) from the string text in the field (Main Phone).

2) CREATE a CALC field called "INSEERT AREA CODE" that is a nested IF statement that checks to see if my MAIN Area Code field is empty, and if it is, inserts the "extracted" area code.

Case( IsEmpty(Main Area Code); "extract area code"; "")

BUt, unfortunately this solution is not working...

any ideas people???

Posted

It all depends on how your phone field is formatted. I am guessing you have local and long distance numbers - perhaps you shoud start by examining how many digits are there (using the Length() function).

If I had to have this functionality, I would make a separate field for the area code, and enforce a tighter discipline for data entry in general. There's too much room for ambiguity here: for example, it could be assumed that a number with more than 11 digits is an international number; then alongs comes the user that enters "123-456-7890, ext.2020".

This topic is 7032 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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