Skip 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.

Alphanumeric Phone Format?

Featured Replies

Hi All,

I have the standard calculation in my database for a phone number:

Let (

//define variables:

[

rawNumber = Filter (Phone; "0123456789") ;

length = Length (rawNumber);

red = RGB (160;0;0);

//set error flag for a phone number that's too short

error = If ( length < 10 ; TextColor ("error: " & Phone; red); "")

];

// now apply the phone formatting and return resuilts

If ( error ≠ ""; error;

"(" & Left (rawNumber; 3) & ") " & Middle ( rawNumber; 4; 3) & "-" & Middle ( rawNumber; 7; 4) &

// this condition tests for extra digits that we'll treat as an extension

If ( length > 10; " x" & Middle (rawNumber; 11; length - 10); "")

)

)

How can I tweek this calculation to also format a 10 character alphanumberic phone number? I have many companies that have Toll free alphanumeric numbers ie 800-THE-BOMB. Any help would be appreciated!

Thanks,

Kim

Change this line:

rawNumber = Filter (Phone; "0123456789") ;

To:

rawNumber = Filter (Upper(Phone); "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ") ;

Edited by Guest

  • Author

Hi GenX,

I replaced the line, didn't get an error but it didn't format it to (###)AAA-AAAA.

Works fine for me.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.