CMS Development

asa_curry
Member

passing in HubDB_field value returning token error in editor

SOLVE

for my module in the code below, the module previews (mostly) correctly, and I can select the table, but it won't let me publish as is as it seems the module doens't "see" the table value getting passed in before its rendered: 

 

{% set queryparam = "&content_id__eq="~module.content_field  %}

{% set tableVal = module.hubdb_table %}

{% set table = hubdb_table_rows( tableVal , queryparam ) %}

 

As its functioning as I'd hoped, I just want to publish it...thoughts?

0 Upvotes
1 Accepted solution
anthonypizzurro
Solution
HubSpot Product Team
HubSpot Product Team

passing in HubDB_field value returning token error in editor

SOLVE

Hi There,

 

The custom modules tool is not really set up to handle dynamic HubDB tables (they're not yet portable). We're aware of this issue and looking into a solution.

 

For now, you can get around this by providing a default HubDB ID like this:

 

{% set tableVal = module.hubdb_table or 123 %}

 

Where '123' is a HubDB table that exists in your portal.

 

I hope that helps,

Anthony

View solution in original post

0 Upvotes
2 Replies 2
anthonypizzurro
Solution
HubSpot Product Team
HubSpot Product Team

passing in HubDB_field value returning token error in editor

SOLVE

Hi There,

 

The custom modules tool is not really set up to handle dynamic HubDB tables (they're not yet portable). We're aware of this issue and looking into a solution.

 

For now, you can get around this by providing a default HubDB ID like this:

 

{% set tableVal = module.hubdb_table or 123 %}

 

Where '123' is a HubDB table that exists in your portal.

 

I hope that helps,

Anthony

0 Upvotes
asa_curry
Member

passing in HubDB_field value returning token error in editor

SOLVE

Looking forward to this getting full support, but as long as its not my code for now. 

 

Thank you for the reply!

0 Upvotes