Jump to content

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

Recommended Posts

  • Newbies
Posted

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

  • Newbies
Posted

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!

Posted

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

Posted

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.

This topic is 6759 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.