• Live group demo of Marketing Hub + Data Agent

    Standardize reporting, reduce manual work, and introduce AI without cleanup

    Join us on March 12
  • Marketing that's efficient and human? That's Loop Marketing.

    Explore HubSpot Academy's 39-video playlist and put it into practice.

    Start learning

Linking HubDB table + CRM object by matching values

Luke-Simp
Participant

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.

 

 

<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

 

0 Upvotes
1 Accepted solution
alyssamwilie
Solution
Recognized Expert

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

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

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developer & CMS Specialist | HubSpot CMS, Email Development, Platform Implementation & Content Operations

LinkedIn | Blog

View solution in original post

2 Replies 2
Luke-Simp
Participant

Thanks again. Really appreciate it.

0 Upvotes
alyssamwilie
Solution
Recognized Expert

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

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

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developer & CMS Specialist | HubSpot CMS, Email Development, Platform Implementation & Content Operations

LinkedIn | Blog