APIs & Integrations

kfischmann
Participant

Accessing HubDB Table Info via HubL

I’m hitting an issue when attempting to access HubDb table info via HubL, using the table_info function. Looping through the result and then attempting to access the ‘type’ attribute doesn’t seem to be possible. I’ve tried {{ column.attr(‘type’) }} , {{ column.type }}, {{ column[‘type’] }}, all return either null (when casting to string) or a blank value. I can access the name and the id using any of these mechanisms, so they clearly work - I examined the output and the type variable seems to be a constant or similar as its not wrapped in single quotes as string variables are.

Has anybody experienced similar? I’d love to access this server side instead of having to authenticate and use the JS API.

0 Upvotes
4 Replies 4
boulter
HubSpot Product Team
HubSpot Product Team

Accessing HubDB Table Info via HubL

Thanks for letting us know. This issue is fixed now.

kfischmann
Participant

Accessing HubDB Table Info via HubL

Thanks @boulter, much appreciated.

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Accessing HubDB Table Info via HubL

@karl You should try using the hubdb_table_column instead. Here is a link to the docs that will explain how to use it.

kfischmann
Participant

Accessing HubDB Table Info via HubL

@pmanca, this is effectively the same endpoint, already tried it.

I ended up speaking with David Adams who has confirmed that the behaviour is the result of a bug on the HS side. I’ll post here once resolved.

0 Upvotes