I am having a problem using servoy find()/search() methods on foundsets. I have a method to find a customer from my customer table by customercode. customer code can a combination of numbers, characters and special characters. I have a customer with customercode: “A\B Something” when I do a search on my customertable foundset I do:
This search gives me 0 records and can not find the customer because when I search the customer “A\B Something”, the search function changes the value to “AB Something”. So I escape the "" as the documentation says. That’s how I do it:
This again will give me 0 records although it checks for the right value when I debug it! My customer record is already saved in the database. The foundset is not in the editing mode and I can retrieve the record by using databaseManager.getDataSetByQuery(server_name,sql_query,arguments,max_returned_rows). I was wondering if this is a servoy bug or I am doing something wrong!
I would appreciate it if someone can confirm that they can get search to work with in a similar condition.
I know So there’s no way to find a record that has a value containing the ‘<’ or ‘>’?
Some sort of a generic escape utility, so I don’t have to hardcode a scenario for each particular symbol?
We can Append “\” to the search string to escape the special characters if any. So the result becomes:
fs[field_name] = ‘\<mmm’;
Another approach is to use proper encryption as we use in password fields.
lopamudram:
We can Append “\” to the search string to escape the special characters if any. So the result becomes:
fs[field_name] = ‘\<mmm’;
Another approach is to use proper encryption as we use in password fields.