I have a huge document hundreds of notes, with several layers of nesting.
I want to add one simple attribute – tags – to all notes.
I tried making a prototype note at the top of the outline and moving all the other notes into it. It made tag attributes but only for first-level notes – no children, or grandchildren, or great grandchildren.
Advice on doing everything with one command would be welcome, or, if a single command won’t do it, the easiest quickest way to get it done.
@coccomel’s suggestion of an agent is best for fixing the issue now.
So, to at $Tags to Key Attributes (KAs), the agent action needs to be:
$KeyAttributes = KeyAttribute + "Tags";
But, be aware that doing this sets all (in agent scope) notes to a local value for $KeyAttributes and this breaking a prototype inheritance. So, better might be to review/set the KAs for all your prototypes and then use this agent action:
now, if a note in scope of the agent query has a prototype set, the KAs are (re-set) so as to use those of the prototypes. Those without a prototype have their KA set to add $Tags—or if they currently have no KA, their KA will just be $Tags.
Also, don’t worry if you mess up. KA are set/inherited by attribute ‘KeyAttributes’. So, if it is wrong, it can be identified and (re-)set! :slight_smile This is one of the user errors for which Tinderbox is very forgiving!