How to change an (original) notes attribute instead of its alias

(Rob Klont) #1

I try to change the value of an attribute of notes. This is what happens: notes are collected, but only the attribute of the alias found is changed. The attribute of the original note is not changed. Is there a function in Tinderbox to change the attribute of the original note?

(Paul Walters) #2

Some attributes are “intrinsic” – the value of the attribute for an alias can be different than the value of the original. Here is one of @mwra’s explanatory articles at aTbRef. Notice the syntax in that article for having an agent change the attribute value for the original. For example $Xpos(original) = 4;

(Mark Anderson) #3

@PaulWalters’ is right, I’ll just add a few more links that might help re Designators and more precisely the ‘original’ designator.

Aliases normally share all attributes - indeed $Text is always the same. But, in map view, if I make an alias of a note and place it in a different map I need the flexibility for the alias to have different {X,Y} co-ordinates to the original’s map position. Thus $Xpos and $Ypos are just 2 of the intrinsic attributes. Currently (v7.0.3) only system attributes can be intrinsic - i.e. you can’t make your own intrinsic attributes.

If in doubt about whether a system attribute is intrinsic, open it in the Document Inspector, e.g. here is $Xpos listed in the Ispector on my current Tinderbox document. Note the ‘intrinsic’ label.

On a different tack, of agent actions and aliases, another way you can trip over intrisic attributes can be when trying to use an attribute from the parent of the original note. For an alias inside and agent:

$MyNumber = $MyNumber(parent);

The result is to take the value $MyNumber for the agent. To get the value we intended, you’ve probably now guessed that we need:

$MyNumber = $MyNumber(parent(original));

Note the order of the nesting. This:

$MyString=$Name(original(parent)); !WRONG SYNTAX!

doesn’t evaluate correctly. Lastly, sometime you do want to use the agent’s (i.e. alais’ parent’s) attribute value for a non-intrinsic attribute. Tinderbox has that covered.

$MyNumber = $MyNumber(agent);

The link at the start of the post will give more detail about all these different designators. As you’ll see there are designators for individual notes as well as for groups (e.g. a note’s ancestors).

(Mark Anderson) #4

Note: I’ve updated the image on the Document Inspector/System page of aTbRef to make the use of the ‘intrinsic’ label more evident. As the label is only shown for intrinsic attributes and the cefault presentation of this inspector is for a non-intrinsic attribute I’ve used a selection of $Xpos to ensure the ‘intrinsic’ labels position and form is illustrated.

(Rob Klont) #5

Thank you! This solved the problem.