Is it possible to make a search bar not case sensitive?

Hi,


I am creating a traditional web and my main page has a search bar that can search the different items that are listed in the database. However, it is case sensitive and it might not be as user-friendly as it can be. Is it possible to configure the search bar to not be case-sensitive? 


Thanks.

Jonathan Ng wrote:

Hi,


I am creating a traditional web and my main page has a search bar that can search the different items that are listed in the database. However, it is case sensitive and it might not be as user-friendly as it can be. Is it possible to configure the search bar to not be case-sensitive? 


Thanks.


Hi Jonathan,


Your best bet would be to tweak the query and add syntax to upper case (or lower) both the search term and the data. That way you achieve your desired result.


Stacey

Hi Jonathan,


Yes you can do it using both side ToUpper() or ToLower() function in your filter condition.

Like

ToUpper(TableName.CloumnName)=ToUpper(SearchKeyword)

or

ToUpper(TableName.CloumnName) like "%''+ ToUpper(SearchKeyword)+"'%'


in that case user type lower or upper case but search method will for both side.


Hope this will help you.

Regards

Rahul Sahu