Video Screencast Help
Symantec Appoints Michael A. Brown CEO. Learn more.

Workflow - Compare two Collections

Created: 06 Apr 2012 | 5 comments

I have two collections where Collection A my have items in Collection B. If they exist I want to remove them from Collection A so Collection A only contains unique items. How do I do this?

Comments 5 CommentsJump to latest comment

matzebru's picture

Add a "Configurable Collection Filter" component where you want the filtering to happen. Set it up like the example below:

Click on the ellipsis on the Filter Model and set that up like the image below:

That should work assuming both collections are the same datatype.

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***

noodleNT's picture

We were filtering the results to a new collection instead of just filtering them out of the existing and reusing that for the next check. Simple fix.

 

Thanks for the quick reply

noodleNT's picture

Turns out this will time out with large collections. I was wondering if I could just use the Scripting component to do the dedupe in C#.

AnaMan's picture

Yes, you can. You only need to properly pass collection on input and return it as a result.

You can also write a seperate code file, compile it to a independent DLL and generate a method caller component for this DLL.

noodleNT's picture

I am kinda shocked something like this doesn't already exist.