May 14, 202111:51 AM - edited May 15, 202112:33 PM
Participant | Partner
Passing hubdb foreign ID response into custom module using HubDB row field
SOLVE
We have a custom module using the new HubDB row as a field. As part of a dynamic page template, we're grabbing some rows from a hubdb table using the foreign ID field and then attempting to pass it into the module in hopes it will fill the hubdb row field, like so:
The 'service_picker' is the hubdb row field within the module and what we're trying to pass through is the response from the hubdb foreign ID field. Both fields give a different hubl dictionary in the response so this doesn't work, how could we manipulate the response so they can be compatible with each other?
Passing hubdb foreign ID response into custom module using HubDB row field
SOLVE
I ended up creating a dummy hubdb table field inside the module and passing in the foreign IDs via that. However, not really ideal, I also mutated the foreign ID dictionary to be identical to that of the response of the hubdb rows and it still did not accept it.
Here's the solution you're looking for. We found your post trying to do the exact same thing, and our dude's figure it out:
If you are using a module that has a HubDB row field in it, and then try to programmatically pass a selection from that field inside the module itself, you will likely struggle to figure out how to reference the selection of a hubDB row. Why? Because the page that shows how to reference fields inside modules has every other conceivable field other than a HubDB Row. Has the UbDB Table, but not a row.
Here's how you pass a hubDB row field selection inside a module that is referencing a table using a foreign key:
HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates. Learn More.
Passing hubdb foreign ID response into custom module using HubDB row field
SOLVE
I ended up creating a dummy hubdb table field inside the module and passing in the foreign IDs via that. However, not really ideal, I also mutated the foreign ID dictionary to be identical to that of the response of the hubdb rows and it still did not accept it.