# Filtering on a Foreign Key

**URL:** <https://community.hubspot.com/t/filtering-on-a-foreign-key/72089>\
**Category:** APIs & Integrations\
**Created:** [January 3, 2023, 4:34am UTC](https://community.hubspot.com/t/filtering-on-a-foreign-key/72089 "2023-01-03T04:34:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AStevens](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/astevens/32/52876_2.png) [@AStevens](https://community.hubspot.com/u/AStevens)\
**Post date:** [January 3, 2023, 4:34am UTC](https://community.hubspot.com/t/filtering-on-a-foreign-key/72089/1 "2023-01-03T04:34:27Z")

</div>

I have a child table “Guide: Child” with a foreign key based on column “Name” in “Guide” table.

I want child rows to filter based on this foreign key.. this code returns nothing . Please help 🙂

`{% set topic = dynamic_page_hubdb_row.name %}{% set param = '&topic__in='~topic %}{% set child = hubdb_table_rows(dynamic_page_hubdb_row.hs_child_table_id, param) %}`

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 9, 2023, 9:15pm UTC](https://community.hubspot.com/t/filtering-on-a-foreign-key/72089/2 "2023-01-09T21:15:07Z")

</div>

Hi, @AStevens 👋 Welcome to the community! We’re you able to make any progress here? If not, I am happy to see if any of our community members have insight into your question.

Best,

Jaycee
