Dear app builders,
I want to use a Multi-Select Filter within an SQL WHERE clause using IN. If the filter contains values, it’s all fine. However, if no value is selected in the filter, the transformation of {{filters.myFilter.id.values | list?separator=}}
is completely empty (not NULL, not empty string etc. as far as I can see in the console) which causes an ugly SQL error in the console because it seems like an argument is missing.
Example: SELECT * FROM inputTable WHERE id IN ({{filters.myFilter.id.values | list?separator=}})
I tried to put ''
around the filter like '{{filters.myFilter.id.values | list?separator=}}'
but this leads to an error if several values are selected in the filter, the SQL clause thinks we have one string and not several values.
This should be a very common use case so I hope there is a solution!