Skip to Content

Chect string all upper and all lower letter.

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Mar 06, 2017 at 12:19 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 03, 2017 at 12:27 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 03, 2017 at 01:43 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 06, 2017 at 08:31 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 06, 2017 at 01:12 PM

    thanks Abhilash good luck now it is perfectly

    Add comment
    10|10000 characters needed characters exceeded