I have a matter.
I created an alpha on which I would like to make a restriction on it such that it will not be possible to enter both numbers and letters. I would like when it enter both numbers and letters an error message appears.
I would like it will be enter either only number or only letter
Thanks to help me to solve it
How to manage Alphanumeric variables
-
- Posts: 572
- Joined: July 9th, 2012, 11:32 am
- Location: Islamabad, Pakistan
Re: How to manage Alphanumeric variables
Dear MarcOlivier;
Maybe it works for you.
a.
Maybe it works for you.
Code: Select all
if poschar("0123456789", $)=1 then
if poschar("abcdefghijklmnopqrstuvwxyz",tolower($))>1 then
errmsg ("message 1: you can not etnter alpha");
reenter;
else
endif;
elseif poschar("abcdefghijklmnopqrstuvwxyz", tolower($))=1 then
if poschar("0123456789",$)>1 then
errmsg ("message 2: you can not enter number");
reenter;
else
endif;
endif
-
- Posts: 13
- Joined: November 20th, 2016, 5:54 am
Re: How to manage Alphanumeric variables
Thank you very much.
It works perfectly
It works perfectly