Compare lists with formula

Hi,

Please help.

I have a checkbox field created from a dbcolumn.

I need to modify this by comparing the list from the dbcolum with another list created from a dblookup and only display the values from the dbcolumn that appear in the dblookup.

i have used the following code in a computedvalue field to just display values and all works fine

list:= @dbColumn(“”:“”;“”;“viewName”;1);

list2:=@DbLookup(“”:“NoCache”;“”:Db"viewName" ; “key” ; “result”);

listRes:=@Keywords(list2 ; list1);

listRes

I have tried using the seporator part of the @Keywords but this makes no difference.

Both list1 and list2 give results but when I do the @Keywords I get blank.

I am placing the output on a web form and need to be able to use the result as a checkbox.

Any ideas ?

Thanks in advance

John

Subject: Compare lists with formula

The easiest way to write it understandably would probably be this:

listRes := @Transform(list; “x”; @If(x=list2; x; @Nothing));

You’d probably want to do some error checking before using any of those lists.

Subject: RE: Compare lists with formula

Why use tat newfangled Transform function when the tried and true @Trim(@Replace(…)) has been working since back in the 3.x days :wink:

I’d say this cat has been skinned!

Doug