# Query 2 HubDB columns from one search input?

**URL:** <https://community.hubspot.com/t/query-2-hubdb-columns-from-one-search-input/37987>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [May 27, 2021, 2:00am UTC](https://community.hubspot.com/t/query-2-hubdb-columns-from-one-search-input/37987 "2021-05-27T02:00:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmcmillan99](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tmcmillan99/32/93181_2.png) [@tmcmillan99](https://community.hubspot.com/u/tmcmillan99)\
**Post date:** [May 27, 2021, 2:00am UTC](https://community.hubspot.com/t/query-2-hubdb-columns-from-one-search-input/37987/1 "2021-05-27T02:00:42Z")

</div>

Is it possible to have a queryparam for 2 HubDB columns from one search input?

I haven’t found any examples of that scenario in other forum posts showing it’s possible. It appears that I would have to combine the two columns to have the queryparam work correctly. Before I make that change, I wanted to check here first in case it’s possible.

Thanks,

Terry McMillan

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [May 27, 2021, 1:43pm UTC](https://community.hubspot.com/t/query-2-hubdb-columns-from-one-search-input/37987/2 "2021-05-27T13:43:03Z")

</div>

Hey @tmcmillan99

Have you looked into joining tables using foreign ID? See [this link](https://developers.hubspot.com/docs/cms/guides/hubdb/join-multiple-tables).

---

<div class="post-metadata">

**Author:** ![tmcmillan99](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tmcmillan99/32/93181_2.png) [@tmcmillan99](https://community.hubspot.com/u/tmcmillan99)\
**Post date:** [May 27, 2021, 2:03pm UTC](https://community.hubspot.com/t/query-2-hubdb-columns-from-one-search-input/37987/3 "2021-05-27T14:03:05Z")

</div>

@Kevin-C

I think I am just going to combine the two columns to keep things simple. The part I am struggling with now is getting the queryparam to actually work. I am using the real estate listing example as a model to follow but I must be doing something wrong.

How do I have the submit button trigger the queryparam using the input? Do I need to use javascript/jquery? The real estate example doesn’t show any javascript being needed.

I have been successful in getting the HubDB data to list on the page, however, I need to not have any data listed until a search input is made. And of course, have the queryparam work. This is all new for me so struggling a little bit.

Thanks,

Terry

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 27, 2021, 2:11pm UTC](https://community.hubspot.com/t/query-2-hubdb-columns-from-one-search-input/37987/4 "2021-05-27T14:11:46Z")

</div>

@stefen , any advice for the intrepid @tmcmillan99 who is on a HubDB mission as of late 😀

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [May 27, 2021, 2:16pm UTC](https://community.hubspot.com/t/query-2-hubdb-columns-from-one-search-input/37987/5 "2021-05-27T14:16:51Z")

</div>

@dennisedson @tmcmillan99 HTML forms by default require an input for each query param key pair. So, you could either use a second hidden input if the value doesn’t need to change, or you’ll want to use javascript to create the two query parameters for you.  
I’d recommend looking at [this example on MDN](https://developer.mozilla.org/en-US/docs/Learn/Forms/Sending_and_retrieving_form_data#the_get_method) to get a better understanding of how form submissions work on the web.

---

<div class="post-metadata">

**Author:** ![tmcmillan99](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tmcmillan99/32/93181_2.png) [@tmcmillan99](https://community.hubspot.com/u/tmcmillan99)\
**Post date:** [May 27, 2021, 6:18pm UTC](https://community.hubspot.com/t/query-2-hubdb-columns-from-one-search-input/37987/6 "2021-05-27T18:18:44Z")

</div>

Thanks for the suggestions. I was able to figure out the issue with the queryparam not working…just a typo that I can’t overlooking.

Thanks,

Terry
