@PC_Animal
Task List

Task List – Cross Reference

It's not clear what you want to do with the items that exist in both. I'm going to assume you want to update one table with info from another. In my example I have two tables:
- Task List – 22 Rows
- Task List – Cross Reference – 7 Rows
All 7 rows in the Task List – Cross Reference Table exist in the Task List Table.
---
List Rows Present in Table
In the root of your flow you need to add two List Rows Present in a Table actions. Tip: Rename your actions to keep your flow organized. This will also help you to easily identify which action is pulling data from which table when they are collapsed.

Additional Tip: Use the filter query action to reduce the number of rows returned (if you don't need to return all rows and can filter by a single column—do that so it helps your flow to run more efficiently). My tables don't have many rows so I wont use a filter query.

Get the ID's from the Table You are Cross-Referencing
I want to check if the rows in the Task List Cross Reference table exist in the Task List Table. I've added a Select action to pull out the IDs from that table.
In the From value field insert the value dynamic content from the List Rows present in a table action. Click on the icon to switch to text mode.

In the Map field, insert the dynamic content from the List Rows present in a table action that is storing your unique identifier. For my table it's key.

Add a Join action. Insert the output from the Select action into the from field and in the join with field enter a comma and a space. You could also enter a pipe or semi-colon. Up to you.

Run a test. Review the output of the join action. It should output all the unique IDs from your selected table values into a string separated by a comma (or whatever separator you used in your flow)

Filter Array – Cross Reference
Add a Filter Array action. Insert the Value dynamic content from the List Rows Present in a Table action you that has your cross-reference values. This is why it's important to rename your actions so you select the correct dynamic content.

In the first value field insert the output from the Join action.

Change the operator to contains and insert the dynamic content of the unique identifier from the correct List Rows Present in a table action.

Depending on how your ID's are set up you may want to include the separator a the end. I'm doing this because my ID's start at 1 and this will cause

Return a Count of Items
Insert a Compose action. Add an Expression. Use the length() function.

Select the Dynamic content tab and insert the body dynamic content from the Filter Array action into the length() function.

For testing purposes I will adjust the keys in my cross-reference list where the last three keys aren't included in my main table.

When I run another test, only 4 items are filtered (aka only 4 items from the Task List Cross Reference table were found in the main table)

Condition Check
Add a Condition action to your flow. If items have returned (aka there is number stored in the Compose action—that is not equal to 0), add the rest of your actions to the Yes branch. If not, do nothing.

Loop through Filtered Items
Add an Apply to Each action to the Yes branch. You'll want to loop through the filtered items.

However, you'll notice that the only dynamic content available from the Filter Array action is Item and Body. Refer to this section of a YT Tutorial I uploaded on how to get dynamic content from a Filter Array action

Hope this helps!
If I helped you solve your problem—please mark my post as a solution
✅.
Consider giving me a
👍 if you liked my response!
👉 Level up your Power Automate skills by checking out my tutorials on
YouTube👉 Tips and Tricks on
TikTok and
Instagram