(pretty please: use a back-tick character before after code samples so they render like so,
as "code". By comparison the same phrase, as “code”, has here had its quote type changed by the forum software. As curly quotes don’t work in code it means we can’t tell if the error seen is just forum formatting or in your code sample )
Probably a typo but you’ve spelt ‘BigCo’ 3 different ways: BigCo, BigCO and BicGo. The first can be countered using
.contains(), which is case insensitive. The latter wants fixing at source. But, assuming this is just a typo in creating the post…
I think what you’re trying to do is test if the $SectorList of the config note [sic] contains the value(s) held in the $LastEmployer attribute of the note currently being tested. But you query is testing $SectorList of the note being tested. So we’ll give the config note a unique $Name like “sect_config” (i.e. not a ‘normal’ looking one, as it’s only for config purposes). Now the query:
This works for me. I made 2 test workers one last employed by ACME and the other by Optitech and the query correctly matched only the former.
Actually, I don’t think you need $SectorList. You could have as easily set $Organizations in the ‘sect_config’ note to the desired sub-set of organisation names and used this query:
One less attribute to worry about. Another appraoch is to simply set the agent’s $Organizations to “ACME;BigCo”. Now you can use this query:
This makes it much easier to tweak the string of desired organisations.
(All queries tested)