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

Filter on a lookup field using "in" doesn't work

so I have 3 tables

TableA has fieldA which is a lookup field to table B

TableC has fieldC which also is lookup field to table B


My canvas app is embedded on TableD which has a 1:N relationship with TableA.


So I can get records from TableA.

I can see the fieldA lookup field values in a Gallery.

But I can't then use fieldA lookup field values to filter tableC, is there an issue with this formula?

Filter(TableC, fieldC.guid in TableA.fieldA.guid)

I have also tried

Filter(TableC, fieldC in TableA.fieldA)

Thinking using the record itself but no luck, the filter always bring back empty results.


Currently I had to use a ForAll to build my collection instead of using Filter, which I think it's not ideal.


Delegation is not an issue at this moment as there are only handful records in all tables.


I know look up field is always a bit tricky...


Super User
Super User

Hi @xyd ,


I completed a test to perform I think what you are trying to do here.  I did the following:

1.  Utilized Accounts table which has a field "Primary Contact"

2.  Created a second table called Drew Test that had a field called "Contact"

3.  Created a gallery to show all Account records and the subtitle field is the fullname of the Primary Contact

4.  Created a second gallery that would show the records in Drew Test where the "Contact" field matched the selected record from the Account gallery based on the Contact being the same...


The filter that worked for this was:  

Filter('Drew Tests',Contact.Contact in Gallery1.Selected.'Primary Contact'.Contact)

Screen Shot 2021-07-08 at 5.22.10 AM.png


Hopefully this helps you to solve your issue.  Please accept if answers your question or Like if helps in any way.




Hope this helps. Please accept if answers your question or Like if helps in any way.
Helper II
Helper II


Thanks for your response.


What I need is to do is the filtering against a list of records not just the selected one.

Having said that, it is interesting that your filtering is against the gallery items instead of the connected DS directly.

I think that might just do the trick! Will try that at some point soonish.

Thanks anyways

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,510)