Getting the Duplicate Entries in Two Lists

Mindwatering Incorporated

Author: Tripp W Black

Created: 04/28/2009 at 11:36 PM


Notes Developer Tips

Get Duplicate Entries in Two Lists

@Transform(list1; "x"; @If(x=list2; x; @Nothing));

Get Duplicates of Two Lists:
This code snippet performs a look-up of all items in the production queue for a certain day.
The items queued are likely to include the current document. We want the resulting list to do a find/replace and filter the look-up's result so that it doesn't include this doc's items.

Code Snippet:
tmpThisList = list of this docs returned items
tmpMyChoice = date key of the items in this doc for today

tmp:= tmpMyChoice;
tmpkey:=@If(@IsError(tmp); ""; @Text(tmp));
tmplup1:=@If(tmpkey=""; ""; @DbLookup("":"NoCache"; "":""; tmpv; tmpkey; 5));
tmpdoclist:=@If(@IsError(tmplup1); ""; tmplup1);
tmplist:=@Transform(@Explode(tmpThisList; ";"); "x"; @If(x=@Explode(tmpdoclist; ";"); x; @Nothing));

previous page