/scripts/ahub.form.attachments.js
0

Suppress records if condition is "TRUE"

Mar 10, 2017 at 10:04 AM

29

avatar image
Former Member

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

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

6 Answers

Abhilash Kumar
Mar 10, 2017 at 01:25 PM
1

Yes:

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

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Abhilash Kumar
Mar 10, 2017 at 10:50 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 10, 2017 at 11:40 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Abhilash Kumar
Mar 10, 2017 at 12:15 PM
0

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);
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 10, 2017 at 01:10 PM
0

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

thanks for help

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 10, 2017 at 01:50 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content