This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

Query Syntax

Queries are used by:

Queries are written in action code syntax but with some differences:

If it is desired to control the order in which different parts of a multi-term query are evaluated, each query term—or sub-groups of query—can be enclosed in parentheses, i.e. round brackets '(' and ')'. As with parentheses in a spreadsheet formula, Tinderbox will evaluate the inner-most (most deeply nested) parentheses before working outwards until the whole query is evaluated.

Action code offset addresses can be used, i.e. referencing values in another note $Color versus $Color("Some other note"). In the special case of wanting to reference attribute values in the agent itself, use the 'agent' designator to refer to the attributes of the current agent, whilst smart adornments can similarly use the 'adornment' designator. For example:

Query: $Status=="Important"

Action: $Color=$Color(agent)

This agent gathers all "Important" notes and sets their colour to match the colour of the agent. Note that this is different from

Action: $Color=$Color(this)

since "this" refers to the note being gathered, and is also different from

Action: $Color=$Color(parent)

since "parent" is the parent of the original note, not the parent of the newly-made alias. The latter is a case where, for intrinsic attributes, it may be necessary to use the 'original' designator to avoid using the aliases value for the attribute. Thus:

Action: $Color=$Color(parent(original))

More on Queries

See: