Filter for (not) empty text field in query

Answered

Hi,

I want to have an optional query clause to filter for entries which have a value (strlen greater 0) on a text field.

Unfortunately I am not able to use the strlen filter on the condition/field.

I know I can just leave the value side of the condition empty, but I want to make the where clause conditional by an input parameter.

I know I could just simply copy the whole query and then add a switch/if statement before that. But thats not very elegant I want to avoid such a query/endpoint design.

Any ideas how to solve that?


4 replies