numeri or alpha fix
numeri or alpha fix
how can we fix numeric or alpha ?when we enter data then box take only numeric or alpha. Kindly share the command or logic.
Re: numeri or alpha fix
You can use a regular expression to prompt the user that the alphanumeric text field only accepts alpha or numeric chars.
helps: https://www.csprousers.org/help/CSPro/r ... ction.html
blog post: https://www.csprousers.org/posts/2019-0 ... sions.html
Example:
helps: https://www.csprousers.org/help/CSPro/r ... ction.html
blog post: https://www.csprousers.org/posts/2019-0 ... sions.html
Example:
if not regexmatch(ALPHA_ONLY_FIELD, "^[a-zA-Z]+$") then
errmsg("Field only accepts alpha characters");
reenter;
endif;
if not regexmatch(NUMERIC_ONLY_FIELD, "^[0-9]+$") then
errmsg("Field only accepts numeric characters");
reenter;
endif;
errmsg("Field only accepts alpha characters");
reenter;
endif;
if not regexmatch(NUMERIC_ONLY_FIELD, "^[0-9]+$") then
errmsg("Field only accepts numeric characters");
reenter;
endif;