data entry - phone format

What would you like to see in CSPro?
Post Reply
Posts: 499
Joined: July 22nd, 2016, 3:55 pm

data entry - phone format

Post by AriSilva » July 7th, 2018, 10:22 am

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.

Posts: 458
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: data entry - phone format

Post by aaronw » July 10th, 2018, 11:45 am

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:

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

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

Posts: 510
Joined: December 19th, 2011, 6:26 pm
Location: HAITI

Re: data entry - phone format

Post by htuser » July 10th, 2018, 12:07 pm

Hi Aaron,
Thanks for this future function. It will help validate lot of thinks such as email etc.
Best regards,

Post Reply