Operator Scope of Action:
Operator First Added:
Operator Last Altered:
Function [other Function type actions]
Item [operators of similar scope]
Query Boolean [other Query Boolean operators]
As at baseline
true if the current note is a direct child of item or, put conversely, if item is the parent of the note. Thus it can be thought of as an "is a child of" operator and as such a counterpart to the "is parent of" operator contains(). Note that aliases can be matched by inside(), which may appear counter-intuitive at first encounter: if only wanting to match original notes, see section 'Filtering out aliases' below.
The item argument must be quoted unless an attribute reference. Ways to define item.
Pertinent to map view, inside() and adornments:
- inside(item) is true for a note that is a child of the map's container item.
- inside(item) is true for a map note that is on top of (within or overlapping) the adornment item.
- inside(item) for a map container item does not match any child adornments.
In a more general context
inside("X") is true for note A if any of the following are
- original A is inside X
- an alias of A is inside X
- A is an alias elsewhere, but its original is inside X
The last of these, if overlooked, can give unexpected results. The more expansive matching above is necessary to do things like looking inside agents.
If more than one container matching item is present, inside() returns items matching the first such container as listed in $OutlineOrder. If deliberately wanting to match notes inside any of several same-named containers, e.g. "exploded notes", then use
$Name(parent)=="container name" instead.
Filtering out aliases
To match only originals, i.e. just the first of the three conditions in the previous list above, use
inside("X") & $IsAlias==false.
This operator replaces the legacy #inside query operator.