Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Case in-sensitive searchbar

Is there a quick way to make the searchbar return all matches regardless of case?

At the moment with the code it seems to case must match the filter exactly (case specific), but I would prefer if the user could type lower or upper case and all matches be found.

— asked April 3rd 2010 by Andrew Henshaw
0 Comments

2 Answers

  • i had the same problem, and used the lower() function of sqlite sql to get an additional field in the query-result that is populated with lowercase-text.

    i use this field at the searchAttribute-property. in doing this i get the correct data displayed while using it as lowercase-text for the searchbar. you could also call the toLower()-function of javascript on the datafield your searchbar is bound to, but this crashed my app in the simulator

    — answered April 3rd 2010 by Christian Sigl
    permalink
    0 Comments
  • I believe I saw an update for case insensitive search in the 1.1.3 release. You can either live on the edge by compiling your own from github or wait till 1.1.3 is released.

    — answered April 4th 2010 by Gregor Munro
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.