This topic is locked

Ajax lookup

6/10/2010 11:11:35 AM
ASPRunnerPro General questions
T
Tim author

Hello,
I have a lookup field on an inline add that is using the Ajax popup. It looks like this lookup searches the start of the string as you start to type. Is it possible to have this be a "contains" search?
Let me know if this question doesn't make sense.

Thanks,

Tim

J
Jane 6/11/2010

Tim,
edit generated lookupsuggest.asp file for this purpose.

Find this line:

LookupSQL = CSmartStr(LookupSQL) & (((CSmartStr(GetLWDisplayField(f,strTableName,true)) & " LIKE '") & CSmartStr(db_addslashes(value))) & "%'")



and replace it with this one:

LookupSQL = CSmartStr(LookupSQL) & (((CSmartStr(GetLWDisplayField(f,strTableName,true)) & " LIKE '%") & CSmartStr(db_addslashes(value))) & "%'")