Skip to main content

How can I compare 2 lists and find match elements as per the attached snap:

I have 2 different data sate and I need to match attributes as per the element

 

in dataset 2 list2 elements are mandatory and in dataset 1 list1 elements are should contain list2 elements. if list 2 has 3 elements and list 1 has 5, list 2 elements 3 must match list 2 elements, and the rest 2 elements of list 2 are optional. kindly refer to Snap for a better understanding.

 

 

This should be a start:

  • Create a feature for every combination of ID1, ID2, and any item in list2
  • In every feature find the index of the current item of list2 in list1. If the item is not present, set the index to -1
  • Get the minimum value of the index for every combination of ID1 and ID2. If the minimum value is -1 there is no complete match
  • Add the attribute Results to Dataset 1

Combine_2_lists


Reply