Compare lists

Hello! Is there a way to compare two lists and output values that appear in both lists? Thanks!

Comments

  • You can definitely build out this logic!

    My flow takes in List1 and List2, then I immediately used a Create Data step to make a list of the matches called Matches. Then the first For Each step loops through List1 and for each item in List 2, ForEach Step 2 loops through every item in List2. For both ForEach steps, you will want to make sure that you change the names of the outputs, otherwise they will overwrite each other. I made mine Item1 and Item2.

    Then I added a rule that compares Item1 and Item2. If they are not equal it moves on to the next item in list 2. If they are equal, the item will be added to my list Matches with the Add Item to List step. You will want to name the output of the Add Item to List step to be the same name as your Matches list.

    Once the first item from List1 has been compared to everything in List2, it will move on to the next item in List1 until it reaches the end of the list.

Sign In or Register to comment.