Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Have a gallery filter based on two separate SharePoint lists

Hi Community


I am having issues with getting a gallery to filter based on two SharePoint lists. My code is as follows:

SortByColumns(Filter('OCR Calendar', StatusChoice.Value = "New", User().Email = LookUp('OCR Teams', Reviewer.Email = User().Email)),"Title")


I get this error:




So I need to convert the record to a text somehow, but I cannot figure out how. The second half of the code ( from = lookup) Appears to contain the error. The field "Reviewer" Is a person field on SharePoint 


If anyone can help it would be greatly appreciated 

Super User
Super User

You need to get the text from a field in the record. Here is an example of getting the Reviewers Email address.

SortByColumns(Filter('OCR Calendar', StatusChoice.Value = "New", User().Email = LookUp('OCR Teams', Reviewer.Email = User().Email).Reviewer.Email),"Title")


If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thank you Jeff that did the trick. Thank you for the speedy reply as well 

Hi Jeff


Have recently returned to this code and turns out it wasn't doing what I needed it to actually, so currently the code is this:
SortByColumns(Filter('OCR Calendar', StatusChoice.Value = "Sent for Manager Review", User().Email = LookUp('OCR Teams', Reviewer.Email = User().Email).Reviewer.Email),"Title")


as per your suggestion. However, it isn't filtering correctly. To sum up the  SP list I have it contains Team names in one column, and the Person who reviews that team in another ( Which is the Reviewer field) I need the gallery to only show the items that contain items for that Reviewers Team, but currently it just shows all items regardless of Team.



Any idea what I am missing? Thank you in advance for your help 

Hi @Pxtavern ,

The second part of your lookup is doing nothing

User().Email = 
   'OCR Teams',
   Reviewer.Email = User().Email

as it is not filtering any field in 'OCR Calendar'. What fields do you have in 'OCR Calendar' and 'OCR Teams' to link the Lists?


Super User
Super User

Hi @Pxtavern ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Hi Warren, Thank you the solution you gave on: was what I needed Thank you 🙂 

Helpful resources

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

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.

Users online (3,946)