Page 1 of 1

data entry - phone format

Posted: July 7th, 2018, 10:22 am
by AriSilva
I know this is a little bit out of line, but in the future would you consider having a phone number format that includes (or not) the area code?
Something like
(xxx) - (yyyyyyyyyyy)
I know also this is complicated for several reasons, one of them being the variable number of digits in different countries. Another might be having two fields in the same screen.

Re: data entry - phone format

Posted: July 10th, 2018, 11:45 am
by aaronw
In the next release we plan to add a function that will return whether a given string is a match for a regular expression. A regular expression is a special text string for describing a search pattern. For example, you'll be able to write something similar to this in the future:
postproc

    string regex = "(^\([0-9]{3}\) - )?^?\([0-9]{11}\)";

    if not regexmatch(TELEPHONE, regex) then
        warning("The telephone number is not formatted correctly.");
        reenter;
    endif;

Re: data entry - phone format

Posted: July 10th, 2018, 12:07 pm
by htuser
Hi Aaron,
Thanks for this future function. It will help validate lot of thinks such as email etc.
Best regards,