Attribute = data

Tinderbox Icon

Attribute = data

For all the gathered notes, sets the value of the specified Attribute to the given data; most often this is an attribute value. However, note that the data is a fixed value, not an expression. If a string to right of an = sign (or any variant of that, !=, <=, etc.) is a an attribute name, the name and not the value of the attribute is assigned as the value of the left side's attribute. Assume a note has a Color value of 'red' and the Rule:

MyUserAttr = Color

The result is not 'red' but rather it is 'Color'. If you want the value of an attribute, i.e. 'red' in this example, then your ruke should be :

MyUserAttr = $Color

See the note on $Attribute for further detail.

It is possible to confuse action/rule use of the = sign with agent queries. In the latter case the = implies a comparison. With actions/rules is is an assignment.

From v3.0.2 actions and rules are allowed to specify a different target:

attribname(parent)=theValue

attribname(/path/to/note)=theValue


Up: Actions & Rules
Previous: Group Operators  Next: Attribute |= expression 

[Last updated: 3 Dec 2008]

Google search aTbRef for:  

Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]

Creative Commons License

Made with Tinderbox