How do you compare two lists of contacts to find missing records?


I would like to know if there is a way to compare two lists of triContactRole records and find the records that are not in both lists. The case is as follows: (1) One list of triContactRole records is associated to the triCapitalProject object. (2) The other list of records is associated to the triPurchaseOrder object. (3) So I would like to copy the triContactRole records from capital project to purchase order, but only those that do not already exist in purchase order. Is there any way to do that?

One way might be to have a workflow where a Query task grabs all of the resulting contact role records associated to the capital project record. Then have an Iterator (Iter) task that goes through each of those records. Within the Iter, you can have another Query task grabbing the contact role records of the purchase order record using the Iter record as a filter. Then have a Switch task that says if the result count of the second Query task = 0, then create the contact role record for the purchase order record.

[Admin: To see other related posts, use the Iterator tag.]

Continue reading

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s