Hi Paul,
Shouldn't this work?
[contains(straat, 'willem de zwijgerlaan')]
I thought contains was case insensitive just like the "Like" operator.
Regards,
Is it possible for Mendix implementing the following XPath functionnalities :
lower-case()
upper-case()
and translate().
it will be more simple for everybody
I tried [string-length(Name) = string-length($object/Name) and contains(Name, $object/Name)].
Example :
$object/Name =[‘Ana’,’anlus’] --- Name=ana
Result : ‘’Ana’
Just tried this and indeed contains is case insensitive, just like Corné Hoogendoorn said
[contains(straat, 'Willem de Zwijgerweg')]
Hi Paul,
If you are looking for a high-performance full text search you should consider implementing Lucene. https://appstore.home.mendix.com/link/app/3099/
It allows you to search case insensitive and much more. For example, in your case the following queries would all work:
"Willem Zwijgerweg" //ommiting a word
"de zwijgErweg willem" //mixing up the order of the words and the case
"zwijgErweg willem" //mixing up the order and the case and ommitting
I think you get the point.
If you think this is a bit of an overkill, I would go for a simple workaround to introduce a second attribute where you store the name in all lowercase (or all uppercase). Then when you search you also make sure to convert the query term to lowercase (or uppercase). Unless you have millions of records I wouldn't worry about database memeory.
-Andrej
Another option, depents on how big the databse entity is…
For example you want to look for Willem de Zwijgerlaan in the database:
This will return a list of all foun objects.
This works perfectly for the following cases:
- You already retrieve all the attributes
- The entity does not have too many rows (or you don't care about performance)
- with the filter by expression you have tons of posabilities :))