passing in HubDB_field value returning token error in editor

SOLVE
New Contributor

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?

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
HubSpot Product Team

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

Reply
0 Upvotes
2 Replies 2
Highlighted
HubSpot Product Team

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

Reply
0 Upvotes
New Contributor

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

 

Thank you for the reply!

Reply
0 Upvotes