Skip to main content

How do I Identify the differences between two similar columns across two lists? Seems simple however having searched long and hard for the answer and having tried several offered solutions I cannot get this to work !   

Below is my latest attempt where I have used a collection operation and  "Remove by value".  I haven't seen this approached in this way however using the  more common filtered list approach just wouldn't work for me (  ).

Site Workflow:

1) Query Employee List and create Collection Variable "Collection List B"

2) Pass "Collection List B" to a "For Each"  - Variable "Text B"

3) Query the competency list  and  create Collection Variable "Collection List A"

4) Remove "Text B"  from "Collection List A" in a collection operation ( Remove by Value)

5)Pass "Collection List A" to a For Each - Variable "Leavers"

6) Update "Business Leaver" field to Yes in List A If employee = Leaver.

210176_pastedImage_6.png

Try these steps. 

Assumed you don't have duplicate values in both Lists.

1. Query List A - (main list - which has more values). 

210213_pastedImage_1.png

2. Query List B

210214_pastedImage_2.png

3. For each action on 'colB' (each value reading by a text variable)

210215_pastedImage_3.png

4. Inside for each, use collection action to remove each value from 'colA' (main collection)

210216_pastedImage_4.png

5. For each action, each value in new 'colA' (remaining items after removing all colB items)

210217_pastedImage_5.png

6. Use update item to update your list field

210218_pastedImage_6.png

Final one

210219_pastedImage_7.png


Lakshmi C‌ - Great work, Many thanks for taking your time to post! 


Hi Lakshmi C,

I've a similar problem to the one above with one key difference and am wondering if you can help me figure out the issue as everything I've tried has resulted in dead ends.  A link to my post here is enclosed, but here's the basics of the problem:

List A = Active Projects
Report B = A csv file of completed projects

Putting both types of projects into collections, I need to determine whether any items in colB exist in ColA.  (All, some or none of colB items may exist in colA.  

Anytime a colB item exists in colA, I want to update the colA item to mark it as complete.

When I try this running a For Each loop on colB, the workflow never finds a match in colA - even though my test colB is a subset of items from colA.  If I hard code that same value, the workflow behaves properly.

My full post is here.

Any help would be appreciated.

Thanks much,

Rae Ann


Reply