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

Filter Table with Collection Foreign Key

Can't figure out the proper code. I'm trying to filter a table/SPList with a collection that has fields that are lookup fields.

Filter(table1, table1_pk in collection.table2_fk)

Usually a simple ".Id" at the end of the fk/lookup reference works, but not this time.
Please help! 

Super User
Super User

What's the name of the collection "collection"?

Also what ColumnName are you referring.

Usually it should be

Filter (Table1,Table1_pk in Collection name.ColumnInCollection)


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

The name of the collection is dbSamplesJCT. I've used the exact format that you have specified. I either need to convert the record in the collection to the ID value, or what I'm trying to do which is reference the column in the collection which is a lookup and causes issues. Do you know if I can do this? If you're curious, the code I'm using is below:

Filter(storage_codes, storage_code_pk in dbSamplesJCT.storageFK)

The "storageFK" is the lookup column for "storage_code_pk" in storage codes. Seems like this should be simple, but I just can't figure it out and have been trying for awhile. 

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,820)