Do filters support LIKE or CONTAINS logic?

Do back-end filters support LIKE / contains logic?

For example:

Is it possible to filter for LIKE “%King” OR filter for CONTAINS “King” and get all authors with King in their name?

image

If yes, what is the syntax? I didn’t see it in the docs.

Hi Whitney,

It is not possible to filter on a specific attribute with the key words LIKE or CONTAINS. However, depending on your use-case, there are various ways to implement similar results. Check out these 2 articles as they discuss ways it can be accomplished.

Let us know if you have further questions.
Best regards,

1 Like

@jason.sooter1

We’ve been using the hack you suggested of filtering for values using strings of OR statements. It’s bulky code but it works fine.

I have the recipcrial use now of filtering out values.

Do you know the syntax for multiple NOT statements? The examples from the docs only show this for one and I haven’t been able to figure out the logic to get the right output.

Example,
filter: NOT category:Book AND NOT category:notebook AND NOT category: …

But, this isn’t quite right

I found a solution.

widget with filter string
filter: ‘NOT Category: “X” AND NOT Category: “Y” AND NOT Category: “Z”’

1 Like