Operator Scope of Action:
Operator First Added:
Operator Last Altered:
Operator Uses Regular Expressions:
Operator Has Newer Dot-Operator Variant:
true if the note evaluated from a single item is a direct child of the current note or, put conversely, if the note is the parent of item. Thus it can be thought of as an "is parent of" operator and, as such, a counterpart to the "is a child of" operator inside().
This is a full path so can match only the root-level note 'foo'. But:
could match any note with the name 'bar' of which there may be more than one. If there is more that one, Tinderbox chooses one. This is fine if one match was desired but if there are known to be multiple 'bar' notes and it is desired to locate parent container of every one, then a different approach is needed, using any(): the process is described under any().
NOTE: Checking attribute values, as opposed to object containment
There are a range of other tools to check if a String-, List- or Set-type attribute's value contains a desired search string/regex.
- For String attributes there are String.contains() and String.icontains().
- List and Set date type attributes also support .contains() and .icontains() though in this context the scope of regex matches is slightly different from that with a String-type attribute (see the linked articles).
- Single words alone can be checked using word(), which works across $Name, $Text and all String-type attributes.
This operator replaces the legacy #contains query operator. The latter should not be used for new code.