Searching in filter using a list with 'or'

Hi team,
in the filter panel, when you search in a categorical filter, would it be possible to search by multiple terms, which are considered as a list with ‘or’:
image

So in this example, it would need to match all categories in this filter item which contain ‘AA’ or ‘BC8’ or ‘CC8’.

Nico

Good question, Nico.
Currently, the search switches from substring matching to the exact match when we place a comma between the categories. So it’s only possible to find multiple categories by one substring or find multiple exact matches (wiki: https://datagrok.ai/help/visualize/viewers/filters#search). @skalkin and @aydar.akhmetov can answer you if we are planning to implement this feature for our search.

There is a way to perform such filtering, though. You can do it with a free text filter (Filter menu | Add free text filter): the keyword “contains” looks for partial matches (case-insensitive, no quotes, e.g., dis_pop contains as or dis_pop contains uc) and the “in” operator finds exact matches (case-sensitive, e.g., dis_pop in ("AS", "as", "UC")). Here are the examples of such conditions along with the categorical filter:
Screenshot 2021-11-15 102646 Screenshot 2021-11-15 102336 Screenshot 2021-11-15 102540
This filter is not yet finalized, as far as I know, but it allows for more fluent filtering conditions, which you can already use.

1 Like

We already have multiple search, it has a “,” as a separator. But this method looks for exact matches.
We can expand this method by adding a special character, for example *.
Then if you are looking for “Ford, Toy*, BMW” the result will be exactly “Ford”, “BMW” and everything that starts with “Toy”.
Will this solution be convenient for you?

1 Like

Yes, that would be great, thanks!

Thanks for your Input, Diana.
I’m still interested in the text filter, so maybe something to check with the team, on whether this feature will be made more mature in the future

@donufriienko is it possible to have the same feature but as calculated column?
For instance ${dis_pop} in ("AS", "as", "UC") ?

Hi Gregori,
Since 0.132.0 version (the next one), DG supports this:
${dis_pop} in ["AS", "as", "UC"]

1 Like