The Tree of Widsdom

智慧の樹

@Find 'string' in 'container'

Type: Agent

Actual name: agentFind

This agent collects notes inside of container whose text contains string—both are conveniently set by typing them into the text window.

Enter string as the first paragraph and container as the second.

Query only

descendedFrom($Text(agent).split("\n").at(1)) &$Text.contains($Text(agent).split("\n").at(0))

Thus if you type this:

To find notes whose text contains “consent” inside of <b>Computing</b>, type this.
To find notes whose text contains “consent” inside of Computing, type this.

… the result will be this:

Notice the agent’s nice display expression.
Notice the agent’s nice display expression.

The agent’s display expression is set by c_agentFind_DE:

Display expression

(if($AgentPriority!=-1){"@"}else{"• "}) + "Find " + "'" + ($Text.split("\n").at(0)) + "' in '"  + ($Text.split("\n").at(1)) + "' [" + $ChildCount + "]"