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?
{% 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.
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?
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?