Convert searchValue to lowerCase

The org name in the searchBox needs to be converted to lowerCase & then the where clause should be fired.

Tried these:

where org_name like {{'%' + _.lowerCase(orgNameSearch) + '%'}}
where org_name like {{'%' + _.toLower(orgNameSearch) + '%'}}

{{'%' + _.toLower(orgNameSearch) + '%'}} should do the trick, I think.

Thanks for replying, that didn't work tho..
This is what I got

org_name like '%[object object]%'

If orgNameSearch is your component, you want to use {{orgNameSearch.value}}

1 Like

So this worked, thanks for your help! @pyrrho

{{'%' + _.lowerCase(orgNameSearch.value) + '%'}}