Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Function [other Function type actions]
Item [operators of similar scope]
Query Boolean [other Query Boolean operators]
boolean test
v4.6.0
Baseline
As at baseline
word(dataStr)
Returns Boolean true
if the string dataStr (of for or more characters) is contained in the current note's text or title. This operator is quicker for matching whole words than using a regular expression. The function matches all notes that contain a single word matching (case-insensitively) any complete word in:
- the title OR
- the text OR
- any user String data-type attribute(s). This does not include other data types based on strings (List, URL, Set, File, Action, etc.)
The matching is case-insensitive. Note that word() is stricter in its matching than the .contains() function 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 dataStr must be a quoted string containing:
- a single word (no hyphenated words)
- contain only upper or lower case letters, so no white space, digits, or punctuation
- 4 characters or more (values less than 4 characters or fewer are ignored by Tinderbox).
In the query creation pop-ups of agent and Find dialogs this function is listed as "contains word".
Example
This query finds any note where the word 'confusion' occurs (in any case variant) in either $Text or $Name :
word("Confusion")
Note how dataStr is case-insensitive.
Legacy issues
This operator replaces the legacy #word query operator.
See also—notes linking to here: