Query 2 HubDB columns from one search input?

SOLVE
tmcmillan99
Participant | Platinum Partner

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

0 Upvotes
1 Accepted solution

Accepted Solutions
tmcmillan99
Solution
Participant | Platinum Partner

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

View solution in original post

0 Upvotes
5 Replies 5
Kevin-C
Recognized Expert | Partner

Hey @tmcmillan99 

 

Have you looked into joining tables using foreign ID? See this link.

tmcmillan99
Participant | Platinum Partner

@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

dennisedson
Community Manager

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

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
stefen
Key Advisor | Partner

@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 to get a better understanding of how form submissions work on the web.

Stefen Phelps, Community Champion, Kelp Web Developer
tmcmillan99
Solution
Participant | Platinum Partner

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

View solution in original post

0 Upvotes