This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

contains(item)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Query Boolean   [other Query Boolean operators]

 Already in v5.0.0

 


contains("item")

Returns true if the note evaluated from 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().

The item parameter must be quoted unless an attribute reference. Ways to define item.

in the query creation pop-ups of agent and Find dialogs this function is listed as "is container of".

This replaces the legacy #contains query operator.

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 pattern. For String attributes there are String.contains() and String.icontains(). List and Set date type attrinbutes also support .contains() and .icontains() though in this context the scope of pattern matches is slightly different from that with a String-type attribute. Single words alone can be checked using word(), which works across $Name, $Text and all String-type attributes.


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Actions & Rules : Operators : Action Operator Scope : Item-based operators : contains(item)