Suppress records if condition is "TRUE"

Hallo experts.

Please it is possible suppress records ("town") which is equal condition as "TRUE"?

I have formula for check only lower or upper letter:

stringvar s :={town};
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;exitfor;););for j :=1 to len(s) do (
if Not (ascw(s[j])IN[97 to 122])
then(
       k := false; exit for ;););
if s = '' then '' else totext(t or k);

table before executing suppression on screen:

name---lastname---town

Tom----Smith--------dallas

Lucy---Cruise------LondON

Richard--Gere------PARIS

The result should be:

name---lastname---town

Tom----Smith--------

Lucy---Cruise------LondON

Richard--Gere------

Where do I put the formula to suppress those records.? Do you think it will be possible? Many thanks for help.

marek

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Mar 10, 2017 at 01:25 PM

    Yes:

    Not(s = '' OR (t or k));

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 10, 2017 at 10:50 AM

    Hi Marek,

    Right-click the town field on the Details section > Format Field > Common tab > Click the formula button beside Suppress and paste the code in here.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 10, 2017 at 11:40 AM

    Hi Abhilash, understand what you write. I was try it but write:

    A boolean is required

    Formula is ok, I test as fx new fx formula field "check_town" return words True or false.

    Any idea?

    thanks

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 10, 2017 at 12:15 PM

    Ah sorry, I didn't realize we changed the formula to output text.

    Paste the same code, however, the modify the last line to:

    s = '' OR (t or k);
    Add comment
    10|10000 characters needed characters exceeded

  • Mar 10, 2017 at 01:10 PM

    Ok Abhilash, thanks , and now this same formula but suppress records if condition is "False" it is possible?

    thanks for help

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 10, 2017 at 01:50 PM

    Abhilash you are very good :) thanks perfectly it worked.

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content