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

Setting an attribute to (no value)

You can remove an attribute value by setting it to nothing (a longer explanation is below)

$MyAttr=; 

Note the semicolon is not quoted, even for attribute type like strings. You can also use a empty string for string types:

$MyString=""; 

Only the first of the syntaxes above also allows attributes that use prototype or preference settings to re-inherit these again. See about resetting inheritance for more detail.

To explain the syntax further, you are effectively doing this to 'reset' an attribute to default inherited value:

$MyAttr= 

and then explicitly then adding a semi-colon to close the expression. Thus the semi-colon isn't part of the process. So the last code above, if used as a rule on its own, will work but is not recommended. The additional semi-colon makes sure Tinderbox doesn't have to guess your intent and also avoids you having to later remember to add a semi-colon if you add more code on the end of the original unclosed expression.


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


A Tinderbox Reference File : Actions & Rules : Setting an attribute to (no value)