Using CR10, I have a numeric field in my db that holds phone extensions. They're all 3 digit internal extensions, except for a few which are 7 digit outside numbers, stored in the 1234567 format.
I'm trying to display these as 123-4567 and the rest as just 123, with the following formula:
If LEN (ToText({MainUserTable.EXT})) > 3 Then
LEFT({MainUserTable.EXT},3) & "-" & RIGHT({MainUserTable.EXT},4)
Else
{MainUserTable.EXT}
However, I keep getting an error saying that the LEFT and RIGHT functions need a string, not a number. And if I convert all the functions to "ToText", then the final number is formatted incorrectly, with a decimal place on the end.
Any help is greatly appreciated, thanks!
I'm trying to display these as 123-4567 and the rest as just 123, with the following formula:
If LEN (ToText({MainUserTable.EXT})) > 3 Then
LEFT({MainUserTable.EXT},3) & "-" & RIGHT({MainUserTable.EXT},4)
Else
{MainUserTable.EXT}
However, I keep getting an error saying that the LEFT and RIGHT functions need a string, not a number. And if I convert all the functions to "ToText", then the final number is formatted incorrectly, with a decimal place on the end.
Any help is greatly appreciated, thanks!