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

!$AttributeName (short form test for no value)


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

 


!$AttributeName

In queries and conditional action code expressions, starting an attribute name preceded by an exclamation mark plus a $ character functions as a shortened form of the Boolean test for a false value. Thus the following are functional equivalents:

$MyBoolean==false 

!$MyBoolean

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:

$MyAction=="" 

$MyColor=="" 

$MyDate==never 

$MyFile=="" 

$MyList=="" 

$MyNumber==0 

$MySet=="" 

$MyString=="" 

$MyURL=="" 

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.

Occasionally, especially in multiple term conditions/queries, a !$AttributeName can get mis-parsed. If results are incorrect it can help to place parentheses (round brackets) around the term to clarify operator precedence. The following are all correct, and functionally equivalent:

inside("Tasks") & !$Checked 

inside("Tasks") & (!$Checked) 

(inside("Tasks")) & (!$Checked) 


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


A Tinderbox Reference File : Actions & Rules : Operators : Full Operator List : !$AttributeName (short form test for no value)