Make Ajax Lookup Wizard case insensitive |
3/21/2025 3:51:42 PM |
PHPRunner General questions | |
L
lewis author
When setting a field's edit mode to Lookup Wizard (v. 10.91), the Dropdown box option is case insensitive. Changing to "Edit box with AJAX popup" works but only if all capitalization is matched. I'd like it to work like the search function, case insensitive. A thread from January 2024 seems to indicate the Ajax lookup had been case insensitive until some change in 10.91. I have not tested previous versions. Is there a way to get this to be case insensitive? Maybe something in the After Application Initialized event? Thank you. |
|
C
|
Chris Whitehead 3/22/2025 |
I had the same issue, the lookup was case sensitive and I needed it to be insensitive. It was the column type in mysql, I had it as varbinary and it needed to be varchar. |
L
|
lewis author 3/24/2025 |
Thank you for responding. I verified that the field in question is varchar and even tried explicitly casting it just in case. It didn't make a difference either way. Were you using version 10.91 in your case? At least one user mentioned it changed to be case sensitive in v10.91 where it had not been before. (I have not tested previous versions.) Interestingly, the log in the database shows the query using LIKE for the editing and adding, but it uses ILIKE when using that field in the fixed search section on the side. The search works with a case insensitive lookup, verified in the log. So there is a difference between the two. Did an update inadvertently change that? |
C
|
Chris Whitehead 3/24/2025 |
@lewis The problem I had was in version 11, I can't say if this was the same in V10.91 I'm using MySql/MariaDB and in those the condition LIKE is case insensetive. WHich DB type are you using?
|
L
|
lewis author 3/24/2025 |
Interesting feature for MySQL. I'm using Postgres which requires ILIKE for case insensitive comparison (unless doing a custom database collation change, which isn't in the plan). |
M
|
MikeUk 4/2/2025 |
Have you checked your MySQL strings end with ci screenshot. The ci = case insensitive.
|
L
|
lewis author 4/3/2025 |
Thanks, MikeUk. I'm actually using Postgres and not MySQL. I can see in the database log that the lookup queries are created using LIKE instead of ILIKE which the search options use. Can I put in a request to either be case-insensitive by default or have an option similar to the search setting checkbox which says "Case-sensitive search"? In the meantime, is there something I can do with events that can switch LIKE to ILIKE for lookups? |