Notes not found

Having accumulated a bunch of notes, I’m trying to group them topically. Accordingly, I wrote the following agent:

$Prototype==“ProtoNote”& ($Text.contains(“hydrogen”) | $Name.contains(“hydrogen”))

The first part works as intended, extracting my actual notes while discarding the underlying papers. (Which are in a watched folder from DevonThink.)
The second part correctly finds a note titled “Hydrogen and IGZO,” but not a note titled “Hydrogen and BTI in IGZTO.” What am I missing?

(It doesn’t matter for the query, but IGZO and IGZTO are chemical compounds. BTI is a reliability metric.)

$Name.contains("hydrogen") matches “hydrogen” but not “Hydrogen”; .contains is case-sensitive. .icontains( ) is case-insensitive, but as a chemist who works in computer science, I think the computer scientists have the right end of this stick: “Hydrogen” and “hydrogen” are not equivalent.

And I didn’t immediately catch that because the “Hydrogen and IGZO” note has “hydrogen” in the body.

I’m still somewhat confused, though, as I unchecked the Agent/AgentCaseSensitive attribute. If that option doesn’t make the agent query case insensitive, what does it do?

[checks $AgentCaseSensitive, whose document suggests this is for legacy pre-v6 use]

I do not believe $AgentCaseSensitive does anything in v6+, as it relates to the old UI (i.e. Create Agent dialog) which no longer exists in the same form.

Otherwise, as per a previous answer above:

Also see a listing of query boolean operators.

1 Like