Access the data for a foreign column in HubDB

I have a HubDB table with a foreign column.

I want to access the data for one of the values in the foreign column.

Doing {{ dynamic_page_hubdb_row.listing_agent|pprint }} prints:
(SizeLimitingPyList: [{id=111111111, createdAt=1686312011111, updatedAt=168665311111, 1=‘{type=string, value=Value}’, 2=‘{type=string, value=+1.11.977.111}’, 3=‘{type=string, value=test@test.com}’, 4=‘{type=string, value=DRE1234}’, 5='{type=image, value=Image{width=283,height=500,url='https://1111.hubspotusercontent-na1.net/hubfs/111/test.webp’,altText=‘’}}'}])
But how do I access the column “5” (in the foreign table, this column is called photo). The options I tried do not work. I tried these and they all print “null”:

  • {{ dynamic_page_hubdb_row.listing_agent.5|pprint }}
  • {{ dynamic_page_hubdb_row.listing_agent[5]|pprint }}
  • {{ dynamic_page_hubdb_row.listing_agent[‘5’]|pprint }}
  • {{ dynamic_page_hubdb_row.listing_agent.photo|pprint }}

The Foreign ID column type is a multiselect so you have to actually loop through the values to get the available content.

{% for agent in dynamic_page_hubdb_row.listing_agent %}
 {{ agent.photo.url }}
{% endfor %}

Oh, cool beans. I guess there is no way to limit it to allow users only select one item. In any case, thanks for helping out with this! :slightly_smiling_face: