[I’ve added formatting to the last post to make it easier to read to code (using Admin’s access)]
Although Text.icontains... works for legacy support reasons the correct syntax here is $Text.icontains....
Your #2 does nothing except add load to the rule processing. The code evaluates a query as true or false. But in a rule that outcome is pointless as you aren’t doing anything with the output. Instead, you are running 3 computationally expensive query terms in every note button no effect. I would suggest removing that rule.
Also, though findAgent is a valid attribute name, if re-using this code I’d suggest using FindAgent as being more consistent with Tinderbox attribute naming convention (N.B. attributes are case-sensitive). Why? because it is easy for most typists to make case errors and they are easier to spot for things like attributes if one uses a consistent naming method. When I see $findAgent I immediately think is that a typo or a deliberate name!
It really worked, and when you delete the rules under point 2
But for some reason I do not react to the case of letters in the command icontains
I’ll take your comment about naming attributes into account in the future
What is the string (exact case please) that you can’t match, and in what attribute?
If the target attribute is $Name don’t forget that on screen, in the view, you are seeing $DisplayName not $Name and the two strings may differ from $Name if you are using a Display Expression. So, you might be trying to match characters that aren’t actually in $Name but only in $DisplayName.
Ah, you meant a non-Roman text. That possibility occurred just after I’d posted. I can confirm your problem with the (I’m using OS 10.14.6 in case that is pertinent, and my locale is ‘en-gb’).
Checking further, I can use the capitalised version of the text with .lowercase' and get the lowercase example string. I can do the reverse with the lower-case example and .uppercasebut not.capitalize`.
Well, this is a workaround for now. For me, with a note holding one of the two examples in the $Text of two different notes, this agent matches both notes: