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

Jump to the current version of aTbRef

TinderboxSix Icon

Does Not Equal


$Attribute != $OtherAttribute

$Attribute ≠ $OtherAttribute

This uses the negative equivalent test to the double-equals (==) usage for tests of equality.

Note that, when parsing queries, the template is evaluated in the agent's context. In particular, attribute references on the right side of the test are made to the agent and this refers to the agent. Conversely, in actions, on the other hand, the action is evaluated in the context of the note to which it is applied.

Using the '!=' syntax rather than '&#x2260' is recommended if content is to exported to the web as not all fonts include the latter special character; the Unicode address simply says where a glyph is stored in the font, it does not dictate whether it exists in a given font.


$BooleanAttribute != false

!($BooleanAttribute == false)

Matches notes whose BooleanAttribute value is true.

For other data types, testing for the presence of a value can be considered a boolean test. This is useful as queries and if() clauses use a 'condition' which must resolve as true or false.

Note in the second example above, that the !(expression) syntax. Note the use of parentheses. Omitting these and simply pre-pending an exclamation mark to the attribute being tested may work but is deprecated in favour of use of parentheses as this helps Tinderbox to parse correctly the user's intent.


$ColorAttribute != color("data")

The data needs to be a string that matches $ColorAttribute case-sensitively. Pre-v6.2.1, tests do not parse named colours, e.g. 'bright red' into their hex equivalent of '#ff0000' or vice versa. The colour set in the attribute is "#CC3F63", data of "#CC3F63" will yield true, but data of "CC3F63" will yield false; the "#" prefix character must be included for non-name colours. From v6.2.1, named colours matching hex values will be match and the case of hex values is ignored. Thus color("#0000ff") matches color("#0000FF") and color("bright blue"). But none of those would match color("Bright Blue") - unless of course it too had been defined with the same hex equivalent of #0000ff.

Note that Tinderbox's pre-defined named colours are all-lowercase, and that hexadecimal colour codes created via the colour picker use lower case for any letter characters.


$DateAttribute != "aDate"

In tests of date inequality, the time element of a date/time is ignored. In other words the granularity of test is for the dates not being on the same calendar day.

$DateAttribute != date("aDate")

True where $DateAttribute date does not match the given aDate's calendar day.

$DateAttribute != date("today"). True where $DateAttribute date is not today's date (same calendar day).

$DateAttribute != date("yesterday"). True where $DateAttribute date is not yesterday's calendar day.

$DateAttribute != date("tomorrow"). True where $DateAttribute date is not tomorrow's calendar day.

$DateAttribute != "never". As never is 'no date', this is effectively a test that a value exists for the attribute. Note, 'never' is not < any date, nor is it > than any date, but it is equal to 'never'.


NumberAttribute != number

or

Gathers all notes whose NumberAttribute value do not equal the given number.

Using the '!=' syntax rather than '&#x2260' is recommended if content is to exported to the web as not all fonts include the latter special character; the Unicode address simply says where a glyph is stored in the font, it does not dictate whether it exists in a given font.

Note that the usage '<>' is not a valid method in Tinderbox for asserting inequality.


$ListAttribute != "data"

Note: Tinderbox does not perform meaningful equality comparisons on List-type attributes.

A match only occurs if data matches all values in the list. Thus if the list value is "dog;cat" and the data string is "dog", the result is false. If the string is "dog:cat" the result is true; a successful match also occurs for "cat;dog".

It can be seen that data is parsed for all values but that a true result is only achieved if all values match, whereas the likely intention of the user is to see if data matches one, or more, list values.

Lists are best compared using:


$SetAttribute != "data"

Note: Tinderbox does not perform meaningful equality comparisons on Set-type attributes.

A match only occurs if data matches all values in the set. Thus if the set value is "dog;cat" and the data string is "dog", the result is false. If the string is "dog:cat" the result is true; a successful match also occurs for "cat;dog".

It can be seen that data is parsed for all values but that a true result is only achieved if all values match, whereas the likely intention of the user is to see if data matches one, or more, set values.

Sets are best compared using:


$StringAttribute != "data"

True where StringAttribute value is identical to the data string. For instance:

$Text != "Hello" 

…would be true if the note's text consisted of something other than just the word "Hello".

Note the data string is must be quoted (it may work without quotes but don't rely on that!).



A Tinderbox Reference File : Objects & Concepts : Concepts : Actions : Basic Comparison Operators : Does Not Equal