Hola! ¡Tenemos nuestra Comunidad en Español!

HubDB | How to print rows with a specific multiselect value selected

SOLVE
New Contributor

Hello. 

 

I'm trying to figure out how to print rows with a specific multiselect value from a hubdb table. For now it works fine if I have just one value selected in the multiselect. When I add more values to the multiselect, this query won't work anymore. 

 

multiselect.PNG

hubdb_column.PNG

With the query above, it wont print the row with two selected values. 

 

Thank you in advance for possible solutions for this Smiley Happy

-Ilkkamarkus

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
New Contributor

Hi @AntonB and thanks for the contribution. Smiley Happy

 

I got it to work by adding "&palvelut__contains=3" 

 

My second problem with this is printing the multiselect values, a simple row.palvelut.name wont work with multiselect.

 

regards,

Ilkkamarkus

Reply
0 Upvotes
2 Replies
Highlighted
Regular Contributor

Hi @Ilkkamarkus

I think the problem is that the code is "subtracting" first choice from itself. 

So basicly HubSpot is doing "X - X ~ "&palevelut-3"" instead of "X + possible_second_choice ~ "&palevelut-3"" 

 

Have you tried to add a second queryparam into the code?

 

Something like 

{% set querypara1 = "" %}
{% set querypara2 = "" %}

{% set querypara1 ~ querypara2 ~ "&palevelut-3"%}

 

regards,

Anton

Reply
0 Upvotes
New Contributor

Hi @AntonB and thanks for the contribution. Smiley Happy

 

I got it to work by adding "&palvelut__contains=3" 

 

My second problem with this is printing the multiselect values, a simple row.palvelut.name wont work with multiselect.

 

regards,

Ilkkamarkus

Reply
0 Upvotes