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

Calc to Insert digit in tel number

Featured Replies

  • Newbies

Hi All,

Cell phone numbers in Bangkok are being expanded from 9 digits to 10 digits next week, and I need a calculation (I think) to make our member database reflect that change. I need to insert an "8" after the first number (a zero).

Example :)

01-XXX-XXXX will become

081-XXX-XXXX

084-XXX-XXXX, 086-XXX-XXXX, etc

My field (Mobile) is defined as text.

Seems simple enough, but it's beyond my understanding. I've been scouring the help files and trying to find something similar in these forums, but no joy. I just cannot figure what function to use to create the calculation. I've been using FMPro for a while now, but my needs have been quite simple.

Thanks, Joette

How about:

Replace ( Mobile ; 2 ; 0 ; "8" )

  • Author
  • Newbies

Oh, wow, that was fast! And that did it!

Can you tell me what it means?

The 2 means the second digit? but what does the 0 mean?

If I understand, I can better figure this sort of thing out in future. Maybe :)

So helpful!

Joette, below is the syntax for replace:

Replace ( text ; start ; numberOfCharacters ; replacementText )

The zero indicates that a character will be added at the second location, if you wanted to replace the second character with an 8 you would set this to 1, or even higher to replace more characters.

Rod

Actually, the zero indicates that zero characters will be replaced. Or, if you like, 'nothing' will be replaced by 'something' - which is another way to describe 'insert'. Thanks to Søren Dyhr for coming up with this.

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.