Print rows of one table on dynamic page of another

SOLVE
Highlighted
Occasional Contributor

Hello.
I have two HubDB tables - one for locations and one for buildings. Each table has its own properies and fields.
I need to print rows of the buildings table on a dynamic page for locations. Is there a way to print all content of the buildings table? Is there a way to print only a specified number of rows?

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Regular Contributor | Diamond Partner

You can use a regular row for loop to print them.

{% for row in hubdb_table_rows(<tableId>, <filterQuery>) %}
{% endfor %}

If you want to print only certain rows depending on the page you would want to use a foreign id to link the two tables.

https://designers.hubspot.com/tutorials/how-to-join-hubdb-tables

Alyssa Wilie
Web Developer
LyntonWeb


Reply
0 Upvotes
2 Replies 2
Regular Contributor | Diamond Partner

You can use a regular row for loop to print them.

{% for row in hubdb_table_rows(<tableId>, <filterQuery>) %}
{% endfor %}

If you want to print only certain rows depending on the page you would want to use a foreign id to link the two tables.

https://designers.hubspot.com/tutorials/how-to-join-hubdb-tables

Alyssa Wilie
Web Developer
LyntonWeb


Reply
0 Upvotes
Occasional Contributor

It helped, thank you!

Reply
0 Upvotes