IsAlpha and IsAlphaNumeric Built-in Functions

Your rating: None Average: 4 (1 vote)

IsAlpha

Use the IsAlpha function to determine if
String contains only textual characters. It excludes all punctuation,
numerics, spaces and control codes.

The function returns a
boolean value: true if the string contains only alphabetic and textual
characters, false if it contains any umbers, punctuation or spaces.

&Value = Get Field().Value;
If IsAlpha(&Value) Then
MessageBox(0,"",0 ,0, "Field is an alpha field");
Else
MessageBox(0,"",0 ,0, "Field is an alpha numeric field");
End-if;

IsAlphaNumeric

Use the IsAlphaNumeric function to determine if String contains only textual and numeric characters.
Textual characters include all characters valid for the IsAlpha function. Alphanumeric characters do not
include sign indicators and comma and period decimal points. If you want to check for numbers as well as sign
indicators, use the IsNumber function.

The function returns a Boolean value: True if the string contains only alphanumeric characters, False otherwise.

&Value = Get Field().Value;
If IsAlphaNumeric(&Value) Then
MessageBox(0,"",0 ,0, "Field is an alpha numeric field");
Else
MessageBox(0,"",0 ,0, "Field is an alpha field");
End-if;

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.
Guest's picture
Guest
Re: IsAlpha and IsAlphaNumeric Built-in Functions

Are IsAlpha and isAplhaNumeric functions avialable in SQR?

Guest's picture
Guest
Re: IsAlpha and IsAlphaNumeric Built-in Functions

It shows unknown function name.

Post new comment

CAPTCHA
The question below is to prevent automated spam submissions.
6 + 12 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.