No announcement yet.

QUICK SEARCH: searching result is case sensitive {HELP}

  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: QUICK SEARCH: searching result is case sensitive {HELP}

    Try This :


    • #17
      Hate to resurrect an old thread (again), but i ran into the same issue and developed a workaround.

      In my case, I wanted to be able to search by two text fields (sender and recipient) those two fields were lookups to my "users" table.
      So the database values were integers,
      In scriptcase the fields were auto-complete text and I was using a lookup in Scriptcase to fetch the names from a different database connection.
      The lookup name fields in the database were set to case insensitive, and I was able to perform a case-insensitive search in phpMyadmin, so I knew the issue was with the programming in scriptcase.
      I was able to search without any issues with case sensitivity in the advanced search, but quick search would only return values if they were all caps like they are in the Database.

      So here is what I did as a workaround, and it seems to do the job.

      Note: I'd recommend creating a new grid, only because the field settings in scriptcase for existing grid will get messed up once you start messing with the SQL and changing the selected fields. at the very least, I'd backup the application if you intend on modifying the existing app.

      In the SQL section of the grid application:
      CONCAT(rec.last_name, ', ', rec.first_name) as rec_name,
      CONCAT(sen.last_name, ', ', sen.first_name) as sen_name
      LEFT JOIN database2.employee_info AS rec ON database1.table1.recipient_id =
      LEFT JOIN database2.employee_info AS sen ON database1.table1.sender_id =

      This created two additional columns in my grid with the values that I wanted to be able to search by.
      It's slightly more cumbersome in the original SQL code, but now I don't have any field lookups on the columns in my grid.

      I then hid the recipient_id and sender_id columns, and displayed the rec_name and sen_name fields in their place.
      I Included the new rec_name and sen_name fields in the "search fields" and removed the recipient_id and sender_id fields, and like magic, the quick search now works using upper or lower case searches.

      Obviously, if you are planning to use an application link to a form application from the grid application, you should just use the scriptcase field lookups in the form application. I only use this workaround for my grid application. What I did in my form application to get the autocomplete fields to work regardless of case, was to set the field to capitalize all letters which is good anyway to keep the database data consistent.

      If anyone more knowledgeable see this as a bad idea, or has a better way to accomplish the same thing, please let me know. I'm all ears, but couldn't find any solutions on the forums or in the manual, so this is what I came up with this workaround. Seems to work well, but I am always looking to learn more.