Re: return string after the first space
> I still need help so it only displays the phone number after the 1st space
Think it through: if the number has a space, you need just the digits after that space, ie if phonenumber= 02 5333 1111, you need the digits starting at 1 + locate(' ','02 5333 1111'), ie substr( '02 5333 1111', 1 + locate(' ','02 5333 1111') ). If there's no space, locate(' ',num_with_no_spaces) returns 0, 1+0=1, so the same formula works for a number with no spaces. So your answer is ...
substr( phonenumber, 1 + locate(' ',phonenumber) )
But it's usually a mistake to make your number parsing contingent on the user having applied predictable spacing. Better to remove the spaces and use the telephone company's rules for parsing the resultant number.
Edited 2 time(s). Last edit at 07/26/2015 10:48PM by Peter Brawley.