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.

Swap fields in same position

Featured Replies

Ok, somewhere along my development line I read that if you have multiple telephone numbers for your contacts (these days don't we all?)you should set up a separate table for Telephone Numbers. I also incorporated a Telephone Format custom function as well. Problem is custom function format doesn't accomodate international numbers. So, I set up a separate field for International numbers. My regular numbers are in a portal.

Here's what I would like to do:

Find a new custom Function that accomodates Intl as well as domestic numbers. That would be the easy way to resolve the issue for me.

OR....

On some of my reports and layouts I want to just show the direct contact number. So, I thought I could place the Direct Line on top of the Intl Number and have only the field that is filled show.

And....

On my main layout "Contacts" I would like to have the Intl number show only if it is "Not Empty." I doubt that I can hide the telephone number portal so I'd just like it to be visible if there is a number in it.

Can anyone point me in the right direction, Please........

Thanks,

Al

I'd stick with the portal and work on modifying your CF to accomodate international numbers. You might search the forums to see if a comprehensive CF exists that does this already. If you can't find build one, you could do a work-around that leaves the formatting alone if the number has an international prefix.

  • Author

Hi Ender:

Thanks for the advice it wasn't as difficult as I thought it would be. Here's the finished CF. Now, if I enter an International number it formats it for me. One of the problems with Intl numbers is that they are all not the same length. In some countries they are similar to ours - 3 digit area code - 3 digit exchange - 4 digit number. So, if you have Intl code = 011 and Country code = 49 and AC = 123 and exchange = 456 and number 7890 the CF will format it 011-49-123-456-7890.

On the other hand if the number is 011320256565 the cf will format it 011-32-025-656-5. I supposed we could try to figure out the minimum and maximum number of numbers on all countires, but, I don't think it matters since the formatting is only to make dialing easier. Any comments, suggestions,corrections would be appreciated.

*************************************************

Case(

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

(Length(Phone Number) = 10); "(" & Left(Phone Number;3) & ") " & Middle(Phone Number; 4; 3) & "-" & Right(Phone Number;4);

(Length(Phone Number) >10) and Left (Phone Number ;3)="011";Left(Phone Number;3) & "-" & Middle(Phone Number; 4; 2) & "-" & Middle(Phone Number; 6; 3)& "-" & Middle(Phone Number; 9; 3) & "-" & Right(Phone Number;4);

"Wrong number format")

*************************************************

Al

You should probably account for those pesky users that may try entering the phone number formatting themselves. This can be done by using the Filter() function to strip away everything but the digits, like:

Filter ( Phone Number ; "0123456789" )

then process it from there.

But what about extensions? You may also want to allow for an x, and leave the formatting for the extension part of the number. Also, since there could be cases where international numbers are entered and you don't know the exact length of those, or someone could type something wrong, it may be better to leave the phone numbers for those unrecognized formats alone (or maybe change its color) rather than replace it with "Wrong number format."

Anyway, if you look around for a good custom function, most of this stuff should be in there.

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.