APIs & Integrations

stephentradify
参加者

HubDB foreign ID column

解決

I noticed a new column type called "Foreign ID" in HubDB. I'm guessing its for accessing rows of other tables but I tried using it in a template and it didn't work. Also I can't find anything about it in documentation. How do you use it?

0 いいね!
1件の承認済みベストアンサー
mcoley
解決策
HubSpot製品開発チーム
HubSpot製品開発チーム

HubDB foreign ID column

解決

The underlying issue was a bug that made these Foreign ID columns case-sensitive. This should be fixed by this afternoon.

元の投稿で解決策を見る

6件の返信
mcoley
解決策
HubSpot製品開発チーム
HubSpot製品開発チーム

HubDB foreign ID column

解決

The underlying issue was a bug that made these Foreign ID columns case-sensitive. This should be fixed by this afternoon.

mcoley
HubSpot製品開発チーム
HubSpot製品開発チーム

HubDB foreign ID column

解決

@dannio Can you DM a link to the table? I cannot reproduce this on my end.

0 いいね!
LPM
トップ投稿者 | Diamond Partner
トップ投稿者 | Diamond Partner

HubDB foreign ID column

解決

I'm also having an issue with this feature.

When I access my table, this is the row data:

{% for row in hubdb_table_rows(*******) %}
    {{ row }}
    the name for row {{ row.hs_id }} is {{ row.name }}
    {% for speaker in row.speaker %}
    the name for foreign row {{ speaker.hs_id }}
    {% endfor %}
    <br>
{% endfor %}

I tried dumping the row data and I got this:
{id=*******, createdAt=1541496386035, 1='{type=string, value=Stuff}', 2='{type=string, value=11:00}', 3='{type=string, value=He}', 4='{type=option, value={id=1, name='standard'}}', 5='{type=option, value={id=2, name='fifteen-minutes'}}', 6='{type=list, value=[com.hubspot.hubdb.model.types.ForeignId@517bffca]}', 7='{type=option, value={id=1, name='1'}}', 8='{type=list, value=[{id=1, name='09:00'}, {id=3, name='10:00'}]}'}

As you can see, in position 6, there's "com.hubspot.hubdb.model.types.ForeignId@517bffca"

When I try to access the data, it's coming back blank for me. {{ speaker.hs_id }} returns nothing.

Am I doing something wrong?

0 いいね!
zwolfson
HubSpot Employee
HubSpot Employee

HubDB foreign ID column

解決

Hey @stephen_c,

You are very observant, that just came out. Here is our documentation on it https://designers.hubspot.com/tutorials/how-to-join-hubdb-tables. If you have any further questions, let me know.

-Zack

BenSBM
投稿者 | Elite Partner
投稿者 | Elite Partner

HubDB foreign ID column

解決

Hey Zach,

I'm getting a console error: "Error:Syntax error in "[missing {{token}} value]"

I can't see why. The if statement for the foreign ID column is fine, outputting {{ row }} shows the data, but I keep getting an error on the inner for-loop. Am I missing something?

0 いいね!
zwolfson
HubSpot Employee
HubSpot Employee

HubDB foreign ID column

解決

Hi @ben_sbm,

I don't see anything immediately wrong with that. Would you mind direct messaging me (if you click on my name you should be to start a DM) a link to the template/module where you are working on this so I could take a closer look?

-Zack

0 いいね!