HubDB using a reference for pricing

I am working on a site that uses a HubDB chart to give out pricing. Currently the chart only looks at one value to give the price, but now we have multiple parameters we want it to check first before giving out a price.
Support said to make a second HubDB that references both, but I do not know how to get it to sync and read the information

Hi @JZollo,

merging/linking several HubDBs is possible with “child tables”.

just open the settings of your main HubDB (Actions → Manage Settings), first enable the dynamic pages checkbox/toggle and then the important part is to enable the child table option

also you can check out this guide about multilevel pages and how to join multiple HubDBs.

Just a question out of curiosity:
Wouldn’t it be easier to put all parameters in one HubDB and use several columns and create some if/unless statements and print the pricing based on the outcome of those statements?

Something like this

{% set hubdb = hubdb_table(...)%}
{# optional settings #}
{% set parameter1 = hubdb.column1 %}
{% set parameter2 = hubdb.column2 %}
...
{% set price = hubdb.price %}

{% for row in hubdb.row %}
{% if parameter1 == "X" %}
{{ price * 2 + "$" }}
{% elif parameter2 == "Y" %}
{{ price // 2 + "$" }}
{% elif parameter 1 == "X" and parameter2 == "Y" %}
{{ price + 2 + "$" }}
{% else %}
{{ price + "$" }}
{% endif %}

(just an idea - not an actual code)

best,

Anton