If the user enters 9 digits: 01202345678 I need it to be changed to 10202 345678 (5 characters + space + 6 characters)
The problem is to know where to enter the code.
The On Validate is not good as if the field is changed by code, it triggers the code again.
I can run the code after leaving the record bit is it possible to do it as the user is entering more data?
My code works only if the user enters 9 characters and no space but not if they enter the 5 space 6 format, it then errors.
Function: formatphonenumber(phonenumber : Text) : Text
space := COPYSTR(phonenumber,6,1);
IF space <> '' THEN BEGIN
five := COPYSTR(phonenumber,1,5);
six := COPYSTR(phonenumber,6,18);
NewNumber := five + ' ' + six;
Experience is what you get when you hoped to get money