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 III
Super User III

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

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (44,393)