I have a multi-select input that has 5 possible options or null. It only searches using the 1st value returned and ignores the rest.
WHERE
(
{{multiselect2.value.length===0}}
OR properties.bed IN ('{{multiselect2.value}}')
)
Not sure what I am doing wrong.
The number of houses providing data for the first value of '1' is 0, but the rest = 17.
ScottR
2
Try
WHERE ({{multiselect2.value.length===0}} OR properties.bed IN ({{multiselect2.value}}))
I removed the single quotes in the IN array
Also try
WHERE ({{multiselect2.value.length===0}} OR properties.bed = ANY({{multiselect2.value}}))
Thanks, that fixed the array, but now when the multiselect is empty I get this error:
WHERE
(
{{multiselect2.value.length===0}}
OR properties.bed IN ({{multiselect2.value}})
)

ScottR
4
Try
WHERE
(
{{!multiselect2.value.length}}
OR properties.bed IN ({{multiselect2.value}})
)
Sorry that doesn't work either. Same error.
ScottR
6
Oops
My mistake - forgot to remove .length
WHERE
(
{{!multiselect2.value}}
OR properties.bed IN ({{multiselect2.value}})
)