A Tinderbox Reference File : Agent Queries : Legacy query code : Special Query Arguments (deprecated) | aTbRef Site Map |
Special Query Arguments (deprecated) |
There are a number of special query arguments on based on attributes or arithmetic operators.
#between(AttributeName, min, max )
This query:
#between(AttribName,minimum,maximum)
is true if the value of AttribName lies between the minimum and maximum values.
minimum <= value <= maximum
The minimum and maximum values may be constants, expressions or may use $AttributeName to refer to other attributes.
The attribute name may also use $AttributeName notation
#between($Name(parent),bar,foo)
In agent create/rename dialogs this is listed as 'is between'.
Replaced by action operator between().
#contains( note )
Effects the expression 'is a container for', gathering all the notes that contain (the original or an alias of) a specified note. If several distinct notes have the same name, the result is not defined.
In agent create/rename dialogs this is listed as 'is container of'.
Replaced by action operator contains().
#descendedFrom( note )
Gathers all children of a note and their children, and so on. To gather just the immediate children use #inside( note ).
In agent create/rename dialogs this is listed as 'descended from'.
Replaced by action operator descendedFrom().
#first( note[, N] )
Gathers the first child of a specified note. Alternatively, a path my be supplied instead of a note name. The optional second argument gathers the first N children of a specified note; if N is omitted, a default value of 1 is assumed.
In agent create/rename dialogs this is listed as 'first inside'.
N may be:
Prior to this N could only be a literal number character.
Replaced by action operator first().
#indented( N[, note] )
The agent query #indented(N) is true if a note is indented exactly N steps. For example:
#indented(0)
... collects all notes in the top level map.
#indented( N, note) is true if a note is descended from the specified note and indented exactly N steps. For example:
#indented(1,Morning Sessions)
... collects the grandchildren of note 'Morning Sessions'.
In agent create/rename dialogs this is listed as 'has indentation'.
Replaced by action operator indented().
#inside( container )
The agent query #inside( container ) finds notes that are the children of the note named in the parentheses or if the container is an adornment, those notes that in Map View lie over - or overlap - the adornment. For example
#inside(Morning Session)
... collects all children of note 'Morning Session'.
In agent create/rename dialogs this is listed as 'inside'.
Replaced by action operator inside().
#last( note[, N] )
Gathers the last child of a specified note. Alternatively, a path my be supplied instead of a note name. The optional second argument gathers the first N children of a specified note; if N is omitted, a default value of 1 is assumed.
In agent create/rename dialogs this is listed as 'last inside'.
N may be:
Prior to this N could only be a literal number character.
Replaced by action operator last().
#linkedFrom( note [, type] )
Gathers all notes that have an incoming link from a specified note. Using an asterisk as a wild card will match any note. The optional type argument further restricts matches to a given link type.
In agent create/rename dialogs this is listed as 'linked from'.
Replaced by action operator linkedFrom().
#linkedTo( note [, type] )
Gathers all notes that link to a specified note (i.e. lists incoming links to the note). Using an asterisk as a wild card will match any note. The optional type argument further restricts matches to a given link type.
In agent create/rename dialogs this is listed as 'linked to'.
Replaced by action operator linkedTo().
#similarTo( note, count )
The agent query #similarTo locates notes that appear similar to a given note. It will find up to count notes, but may find fewer. The sequence of the notes returned is arbitrary. The underlying query is that used b the Similar Notes view.
Similarity is based on several factors, including:
In addition, matches are also weighted by
The same matching technique s also available as an export code - ^similarTo^
In agent create/rename dialogs this is listed as 'is similar to'.
Replaced by action operator similarTo().
#word( word )
The agent query #word matches all notes that contain a single word matching a word in:
Note that #word is stricter in its matching than the #contains query as it looks only for entire words and does not match regular expressions. Although #word examines several different fields, the result is that #word is much faster than #contains.
The word must be:
This query is added to Agent and Find dialog's query pop-ups, listed as "contains word".
In agent create/rename dialogs this is listed as 'contains word'.
Replaced by action operator word().
Up: Legacy query code | |
Next: Export Code in queries (deprecated) |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]