# Linking HubDB table + CRM object by matching values

**URL:** <https://community.hubspot.com/t/linking-hubdb-table-crm-object-by-matching-values/73007>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [January 17, 2023, 12:25am UTC](https://community.hubspot.com/t/linking-hubdb-table-crm-object-by-matching-values/73007 "2023-01-17T00:25:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luke-Simp](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/luke-simp/32/74544_2.png) [@Luke-Simp](https://community.hubspot.com/u/Luke-Simp)\
**Post date:** [January 17, 2023, 12:25am UTC](https://community.hubspot.com/t/linking-hubdb-table-crm-object-by-matching-values/73007/1 "2023-01-17T00:25:21Z")

</div>

Hi all,

Looking to match CRM object “people” selected in module field to table column value. If match, then show the row info associated with that person. i.e. if “preferred\_full\_name” in CRM record is “Jeff Aernie” and “name” in HubDB table is “Jeff Aernie”, then display listings of books associated with this author (with a few other filters applied).

Below is what I’ve got so far. Code works without trying to refer to CRM object but would like to be able to do this. Appreciate the help.

```lia-code-sample
<h2>Jeff's Visible Book Chapters</h2>
{% for row in hubdb_table_rows(5643545, "type_of_publication=Book chapter&visible=yes&orderBy=-year_published") %}
{% if row.name == "module.person.properties.preferred_full_name" %}
{{row.name_of_authors}} ({{ row.year_published }}). <em>{{ row.publication_title}}</em>. {{row.booksbook_chaptersmusic_publisher_name_and_place}} <br>
{% endif %}
{% endfor %}

```

 ![LukeSimp_0-1673914808577.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/2/022b2dfac96659e20527b0514faf23cf159cffe5.png)

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [January 17, 2023, 2:19pm UTC](https://community.hubspot.com/t/linking-hubdb-table-crm-object-by-matching-values/73007/2 "2023-01-17T14:19:03Z")

</div>

I believe if you remove the quotations in the following line it should work:

`{% if row.name == "module.person.properties.preferred_full_name" %}`

---

<div class="post-metadata">

**Author:** ![Luke-Simp](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/luke-simp/32/74544_2.png) [@Luke-Simp](https://community.hubspot.com/u/Luke-Simp)\
**Post date:** [January 18, 2023, 12:39am UTC](https://community.hubspot.com/t/linking-hubdb-table-crm-object-by-matching-values/73007/3 "2023-01-18T00:39:55Z")

</div>

Thanks again. Really appreciate it.
