Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Operator [other Operator type actions]
Item [operators of similar scope]
Query Boolean [other Query Boolean operators]
boolean test
v4.6.0
Baseline
As at baseline
$AttributeName
In queries and conditional action code expressions, using just an attribute name preceded by a $ character functions as a shortened form of the Boolean test for a true
value. Thus the following are functional equivalents:
$MyBoolean==true
$MyBoolean
In both cases the result is true
if the value of $MyBoolean is true
.
In all other contexts, the $AttributeName syntax implies a reference to that attribute.
Usefully Tinderbox also useful supports such short-form $AttributeName tests for all the other attribute data types, returning true
if the attribute has a non-default value. Per data type, this equates to long form tests like:
$MyAction!=""
$MyColor!=""
$MyDate!=never
$MyFile!=""
$MyInterval!="00:00"
$MyList!=[]
or $MyList!=""
$MyNumber!=0
$MySet!=[]
or $MySet!=""
$MyString!=""
$MyURL!=""
In all these cases a short-form test returns true
if the attribute value is not the default for that data type.
A reverse short form test is also offered by (!$AttributeName), i.e. the same syntax with a preceding exclamation mark and enclosing parentheses. In theory, the latter parentheses are not necessary, but in practice it helps Tinderbox when parsing a query.
See also—notes linking to here: