This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

(!$AttributeName) (i.e. a short form test for no value)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

 Operator  [other Operator type actions]

 Item  [operators of similar scope]

 Query Boolean  [other Query Boolean operators]

 Baseline

 As at baseline


(!$AttributeName)

In queries and conditional action code expressions, preceding a '$'-prefixed attribute name with an exclamation mark functions as a shortened form of the Boolean test for a false value. Due to limitations in the underlying parser, an inequality test expression must be enclosed in parentheses.Thus the following are functional equivalents:

$MyBoolean==false 

(!$MyBoolean) 

Do not use this form or you may get unexpected results:

!$MyBoolean Do not use this format, without parentheses!

In both cases the result is false if the value of $MyBoolean is false.

Usefully Tinderbox also useful supports such short-form !$AttributeName tests for all the other attribute data types, returning true if the attribute has a default value. Per data type, this equates to long form tests like:

$MyBoolean==false 

$MyColor=="" 

$MyDate=="never" 

$MyDictionary=="" 

$MyFile=="" 

$MyInterval=="00:00" 

$MyList==[] (or (deprecated) $MyList==""

$MyNumber==0 

$MySet==[] (or (deprecated) $MyList==""

$MyString=="" 

$MyURL=="" 

This also holds for system-only data types:

$MyAction=="" 

$MyFont=="" 

In all these cases a short-form test returns true if the attribute value is the default for that data type.

This test is the logical opposite of the $AttributeName test.