0

# Chect string all upper and all lower letter.

Mar 03, 2017 at 12:13 PM

73

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

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
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
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
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
Marek Moravcik Mar 06, 2017 at 01:12 PM
0

thanks Abhilash good luck now it is perfectly

Share