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.

Featured Replies

How do I fet a filter to work for phone numbers?

IE: 555-555-1212 would convert to (555) 555-1212?

I see

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

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

But do not know how to get it to work.

Thanks

The easiest way to use this formula is to create a custom_function out of it. Then on one of your fields that you want the formatting to occur, have it set to a calculated result with 'Do not replace...' unchecked.

The calc forumla that you use would just be the custom_function applied to the field.

There are also numerous other posts in regards to phone number formatting on these forums.

  • Author

I defined the phone field to use the custom function, but then I get "this field is not modifiable" ;)

Don't use a regular calculation. Use a text field with an Auto-Entered Calculation (with the "Do not replace.." option unchecked.)

  • Author

Ok I must be missing something. I did it and the function does not convert. The function I am using is:

Let ( 

input = Filter (Phone ; "0123456789" ) 

;

Case ( input ;



Case ( 

Length ( input ) = 7 ; 

Replace ( input ; 4 ; 0 ; "-" ) ;



Length ( input ) = 10 ; 

Replace ( Replace ( Replace ( input ; 7 ; 0 ; "-" ) ; 4 ; 0 ; ") " ) ; 1 ; 0 ; "(" ) ;



Length (input ) = 11 and Left ( input ; 1 ) = "1" ; 

Replace ( Replace ( Replace ( Right ( input ; 10 ) ; 7 ; 0 ; "-" ) ; 4 ; 0 ; ") " ) ; 1 ; 0 ; "(" ) ;



input & TextColor ( " too few or too many digits" ; 16711680 )

)

)

)

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.