Trying to use a variable in HubDB query

I’m passing a value to a page via a URL prameter ?lead_origin=soldering and defining ‘process’ per

{% set process = request.query_dict.lead_origin %}.

I need to use the value stored in {{process}} in a HubDB query to select the row matching that value and to return data in some columns per (‘tableID’ substituted for actual ID):

{% set table_id = [tableID]%}<br>{% for row in hubdb_table_rows([tableID], “name={{process}}”) %}
<h1>{{row.heading}}</h1>
<p>{{row.value_prop}}</p>
{% endfor %}

Doesn’t work; returns nothing. Any ideas what I’m doing wrong?

WmFlanigan

Hey @wmflan39

When using a hubl variable inside a funciton you don’t need to use the double brackets, you just need to concatenate the query into a string:

{% for row in hubdb_table_rows([tableID], "name="~process) %}
…

Kevin-C,

Sweet! Thanks very much. I’lll give it a try.

WmF