find record with case insensitivity key

Hi All,
i am new to servoy. i am trying to find record using foundset.search(). By using %key% i am able to get record but when using %#key%, i am not able to get any record.
code:
if(resultFoundset.find()) {
for(var index = 0; index < fieldList.length; index++) {
resultFoundset[fieldList[index]] = ‘%#’+valueList[index]+ ‘%’;
}
resultFoundset.search();
}
where fieldList and valueList are array where i am storing value

Thanks in Advance

I think the ‘#’ must be the first character, so try #%key% instead.

Hi Nanadlalji,

Welcome to the servoy community…:)

For case insensitive searching you can use ‘#’ in front of the value you are searching for.
Please follow this link for more information on the special characters in find-search mode.

Thanks

Hi, you should also notice that your code is doing an AND search. If you want to do an OR you must add a resultFoundset.newRecord() per field.

Thanks all. its working now.

@jasantana - thanks for adding extra point on it. its really helpful for me.