May 16, 20247:37 AM - edited May 16, 20247:57 AM
Member
Dynamic HubDB Row table id
SOLVE
Hello,
Can someone help me with this? I want to use the HubDB Row field in comination with HubDB Table field. 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:
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?
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.
Good idea, I did a few test with the field validation without success.
My code looks this:
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:
[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?
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.
@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:
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.