Skip to Content
0

Chect string all upper and all lower letter.

Mar 03, 2017 at 12:13 PM

37

avatar image

Hi experts of crystals

exist any check for example:

IF {t_name} . . .lower then true else false

IF {t_name} . . upper then true else false

donald true (all letter are lower)

MARK true (all letters are upper)

maRk false

donALD false

I do not know will it be possible.? many thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Best Answer
Abhilash Kumar
Mar 06, 2017 at 12:19 PM
1

Hi Marek,

Please replace the last line in the formula I posted above with the following code:

if s = '' then '' else totext(t or k);

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Abhilash Kumar
Mar 03, 2017 at 12:27 PM
1

Hi Marek,

Try this code:

stringvar s := {Database String Field};
local numbervar i;
local numbervar j;
booleanvar t := True;
booleanvar k := True;
for i := 1 to len(s) do
(
    if Not(ascw(s[i]) IN [65 to 90]) then
    (
        t := false;
        exit for;
    );
);
for j := 1 to len(s) do
(
    if Not(ascw(s[j]) IN [97 to 122]) then
    (
        k := false;
        exit for;
    );
);
t or k;

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Marek Moravcik Mar 03, 2017 at 01:43 PM
0

Oh yea great . . . perfectly It is exactly what I looking.

it is possible small edit?

Firstly should by formula identify blank field. Because if string field is blank (len((t_name)=0) your formula return True. See below.

Donald__ False

Tom ____False

_______True -this field is blank, here should by return "" (nothing), your formula return True

LUCY___True

thanks Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Marek Moravcik Mar 06, 2017 at 08:31 AM
0

it is possible small edit?

Firstly should by formula identify blank field. Because if string field is blank (len((t_name)=0) your formula return True. See below.

Donald__ False

Tom ____False

_______True -this field is blank, here should by return "" (nothing), your formula return True

LUCY___True

thanks Abhilash for update this formula

Share
10 |10000 characters needed characters left characters exceeded
Marek Moravcik Mar 06, 2017 at 01:12 PM
0

thanks Abhilash good luck now it is perfectly

Share
10 |10000 characters needed characters left characters exceeded