How to disable case sensitivity on the fetch filter


I would like to be able to have something similar to String Filter - disable case sensitivity. We are not using C3 UI framework, hence we are making API calls with the filter as contains(name, <user input>). Would it still be possible to have case insensitivity now?

1 Like

You can use containsIgnoreCase expression function. Check documentation with

c3ShowFunc(ExpressionEngineFunction, 'containsIgnoreCase')

You can also combine contains with lowerCase functions to achieve same thing, e.g.:

  filter: 'contains(lowerCase(name), lowerCase("jEn"))'
1 Like

Thanks. It was useful.


If you don’t want to use the contains, you can use the lowerCase function for any string argument. For example:

lowerCase() = “abc”

Keep in mind that when doing case insensitive searching, indexes will not be used by the db, so they can/will be extremely slow on large datasets.

1 Like