Showing results for 
Search instead for 
Did you mean: 
Advocate V
Advocate V

How to do a 1:1 SQL SELECT join across two SharePoint lists

I have searched everywhere for the answer to this requirement and cannot find a match for what must be a common requirement.  This would normally be done using a simple SQL SELECT statement, but this is not supported in Flow ☹


I want to do a 1:1 join across two SharePoint lists where the join is the unique column ‘EmployeeEmail’.


  • Table1 contains the Employee details – one row per employee
  • Table2 contains a minimum of 1 up to a maximum of 5 employee objectives – one row per employee

I have tried using Get List to load Table1 into an array but have got stuck trying to append the Objectives in Table2 to the end of each row in the array.  Do I need one of the Data Operations actions?


The output of this query is going to be fed into the FormsPro Send a Survey action.


TIA folks!

Dual Super User
Dual Super User

Run a Get Items for each list and then try using the Union() function.  There is no easy way to do the equivalent of a Join with SharePoint lists.  But I've used Union() to do this in the past if there is a Lookup column in the second list that points back to the first.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi Paul,


The challenge is I want to append the output from List2 onto the end of List1 (using 'where' as my join) which is why I was trying arrays.  Union just adds the two lists together.  This is so easy to do using SQL SELECT but there is no SELECT command in the expression builder.  Why not I wonder?






If there is a Lookup column in List 2 based on then union should do what you want it to.  


The reason there is no Select where in Power Automate for SharePoint is that SharePoint isn't a relational database.  Its flat tables.  Select Where works in SQL because SQL is designed to be relational.  SharePoint isn't (other than when you simulate relationships using Lookup columns).

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.



There is indeed a Lookup column.  List1 contains all employees and List2 contains their objectives.  When creating a new objective you pick the user email from List1 via a lookup.


What is the syntax for the union expression?  There doesn’t seem to be anything other than the two lists.  Does it magically work out they are joined via the email Lookup column?





In my tests, if you do Union(List1, List2) it will automatically match the records from list 2 based on the lookup column.


Your only other choice would be to build an array of objects manually using two Apply to each loops.  The outer loop will go through each entry in List 1 and the inner loop will go through list 2 looking for a matching email.  When it finds it the inner loop will write an entry to the array containing the value from List 1 and list 2 that match.  Its really manual, but it will work.  Just not sure how performant it will be.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

This is the Union statement I tested: 

It just adds ObjectivesList below EmployeeList rsather than 'unioning' them.
I will try the Array suggestion - many thanks for this input it is much appreciated.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,844)