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?


Hey @stephen_c,

You are very observant, that just came out. Here is our documentation on it If you have any further questions, let me know.



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?


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?



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 {{ }}
    {% for speaker in row.speaker %}
    the name for foreign row {{ speaker.hs_id }}
    {% endfor %}
{% 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?


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


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