Autocomplete / Tags field potential issue
Autocomplete / Tags field potential issue
I have a table with a field named ModelNumber this field is a varchar and contains model numbers such as "603C01" and "M603C01". It also contains Model Numbers such as "123456". The issue I am seeing is the autocomplete field when typing in M will start to return any results that start with an "M" this is good, but when typing 6 ... 0 ...3 nothing is returned until I get to the "C" character. Furthermore whe I try searching for the Model "123456" it never returns any results. I have tried many different approches trying to intercept the value and make sure it is sent as a string to no avail. It seems like it always want to treat a value without some sort of character as just a numeric value and thus never finds a match in my table. If you need any examples or more detail please let me know
{
label: 'ModelNumber:',
name: 'DeliveryQuoteLines.ModelNum',
type: 'autocomplete',
ajax: true
},
Replies
Which server-side libraries are you using for this? If the PHP or .NET libraries, you can add
->debug(true)(or.Debug(true)for C#) immediately before theprocess()method is called. The result of that will be that the JSON response will include the SQL that is generated and executed for the queries for the Ajax request. It will also include the bound values. That's the first place to start when debugging this.Perhaps you can show me the JSON response and also the HTTP parameters being sent?
Allan