# Dynamic HubDB Row table id

**URL:** <https://community.hubspot.com/t/dynamic-hubdb-row-table-id/107312>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [May 16, 2024, 11:37am UTC](https://community.hubspot.com/t/dynamic-hubdb-row-table-id/107312 "2024-05-16T11:37:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SvanEck](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@SvanEck](https://community.hubspot.com/u/SvanEck)\
**Post date:** [May 16, 2024, 11:37am UTC](https://community.hubspot.com/t/dynamic-hubdb-row-table-id/107312/1 "2024-05-16T11:37:51Z")

</div>

Hello,

Can someone help me with this? I want to use the [HubDB Row field](https://developers.hubspot.com/docs/cms/building-blocks/module-theme-fields#hubdb-row) in comination with [HubDB Table field](https://developers.hubspot.com/docs/cms/building-blocks/module-theme-fields#hubdb-table). So first let the Content Creator choose a table and then a row of that table. I tried the following based on the [these docs](https://developers.hubspot.com/docs/cms/building-blocks/module-theme-fields-overview#inherited-fields):

 ![Screenshot 2024-05-16 at 13.29.34.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/3/93ed8f255510810e95060887f1d7f7723fd80b1c.png)

But I cant find a solution. Every attempt and combination gives me the following error on upload:

`HubDB Row selector field rows.download requires a valid HubDB table in published state. Provided HubDb table does not exist or not yet published.`

Whats the correct way to do this in my fields.json? Is it even possible?

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [May 16, 2024, 9:18pm UTC](https://community.hubspot.com/t/dynamic-hubdb-row-table-id/107312/2 "2024-05-16T21:18:47Z")

</div>

@SvanEck - I assume that there is some logic detecting the dependency of row field on the slection of a table ID. Since this evaluated in a “static” manner, the failure might be a logical consequence?

I have not tried this, so am somewhat out on a limb, but it should be possible to make the row field conditionally disabled as described in the docs:

> **[Module and Theme Fields Overview - HubSpot docs](https://developers.hubspot.com/docs/cms/reference/fields/overview)**
>
> HubSpot modules and themes support customization by content creators through fields. Developers create and organize fields through a fields.json file.

If the row field is disabled at the time of evaluation, would the dependency check pass?

I had another - not so clean - thought. This is to insert a default table ID in the configuration. The user could change it, but it might enable you to get the setup working.

Good luck!

Steve

---

<div class="post-metadata">

**Author:** ![SvanEck](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@SvanEck](https://community.hubspot.com/u/SvanEck)\
**Post date:** [May 17, 2024, 9:02am UTC](https://community.hubspot.com/t/dynamic-hubdb-row-table-id/107312/3 "2024-05-17T09:02:25Z")

</div>

Hi Steve,

Good idea, I did a few test with the field validation without success.

My code looks this:

 ![Screenshot 2024-05-17 at 10.30.24.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/3/39e6bd2a647c5ef9968382d9d3fe4df3ef0b6aca.png)

The download row select field should only be active if the test field has value. If I upload this json to hubspot through the HubSpot CLI it still gives the error on upload:

```lia-code-sample
[ERROR] HubDB Row selector field rows.download requires a valid HubDB table in published state. Provided HubDb table does not exist or not yet published.
[ERROR] The format for the HubDb row selector value is invalid

```

I’m starting to think that the field “table\_name\_or\_id” is static and can’t be dynamic in anyway. What do you think?

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [May 17, 2024, 3:01pm UTC](https://community.hubspot.com/t/dynamic-hubdb-row-table-id/107312/4 "2024-05-17T15:01:27Z")

</div>

My primary experience with use of HubDB selectors is as module parameters where you can default them to NULL or a specific published table.  
I would have expected your theme setting logic to be able to pass the static tests - but it looks like there may be unstated limits on use of this type of property.  
I’m not sure my responses based primarily on theory are helping you at this point.  
Steve
