How can I convert an attribute to lowercase in a FIND method ?

Resolved

Hello.

I have this code which compare siren Codes

def sirenCodeSet = FEATURE.fields."newSirenField"
def organizationFound = FIND.organization().withAttributesProjection("sirenCode", "id").matching(expr { prop("sirenCode").eq(sirenCodeSet as String) })?.id

I am now trying to compare withou case : i need to convert my criteria to lowercase

def sirenCodeSet = FEATURE.fields."newSirenField".toString().toLowerCase()

But i am having trouble converting the property "sirenCode" to lowercase in my expr {}.
Trying to import the file using toString() or toLowerCase() or both will tell me that the method doesn't existe.

What is the expected method / code ?

Thanks.

Data model
1 reply
Best reply by Alexandre PALLUEAU

Hello,

Use eqLike instead of eq to perform a case insensitive seach.

Regards,

View original