Queries are action code expressions in a conditional form that must resolving to true/false statements. Agent queries result in the agent creating a list of aliases that will include each matching item once. Thus even if the original and/or one or more of its aliases are all within the scope of the query, that item will create a single alias in the agent. An exception is allowed, where it is needed to locate an original and all its aliases, by using a contains() query based on the item's name as this will match all containers of both that note and all of its alias(es).
Agents - including smart adornments - can match notes (including container notes), separator notes, aliases, other agents but can not match map adornments. Adornments are the one exception to an agent's ability to query any object in the document.
References in this section to "BooleanAttribute", DateAttribute", etc.," refer to any system or user attribute, that is of the data type specified. Thus "BooleanAttribute" implies any attribute of the data type "Boolean".
Note that an agent's query only controls which notes are matched and whose aliases are added as children of the agent. Anything done to the (aliases of) matching notes is controlled via the the code stored in the AgentAction attribute. Action code can also be viewed and edited via the Action Inspector.
Queries are written in action code - see more on query syntax.
- Query Syntax
- Simple Queries - equality and inequality
- String Attributes - comparison operators & case sensitivity
- Querying Lists and Sets
- Controlling Agent Update Cycle Time
- Sorting Agent Results
- Fine-tuning searches using $Searchable
- Using the 'agent' designator
- Regular Expressions in queries
- Agents and intrinsic attributes
- $Attribute = $1 (queries and if statements)
- Self-referring agents
- Date Comparisons - Date vs. Date/time
- Unparse-able queries
- Querying for aliases - agents
- Querying for aliases - find()
- Aliases, children and descendants
- Manually triggering agent updates