Tinderbox Forum

Collect $Name of every note, even on root [my use case is check spelling of note names]

Is there a designator to collect every name of every note, even on root? Children, descendant, etc. would not work? What is the designator for root?

1 Like

Have you tried β€˜all’?

No, thanks! Worked. :slight_smile:

1 Like

BTW, in case anyone is interested.

Since spellchecking does not work in note names, I collect all the note names into the text of a note β€œSpelling,” with a stamp. I add β€œ[[” before the name.

Spellchecking works in $Text.

If I find a note with a misspelling I complete the the ZipLink action by adding the closing β€œ]]” to the end of the offending note.

I can now click on the note and go fix the spelling. I can then click βŒ˜β€™ to navigate back to the spell-checking note.

Here are samples of the action code for your stamp:

If you are root and want to look at all:

var:list vList;
vList=collect(all,$ID);
$Text="";
vList.each(x){
   $Text+="[["+$Name(x)+"\n";
};

If the spelling file is a child of another note, e.g. and article, use:

var:list vList;
vList=collect(descendants(parent),$ID);
$Text="";
vList.each(x){
$Text+="[["+$Name(x)+"\n";
};

What a great idea and example! Thank you!

1 Like

I’m glad you like it. BTW, I just edited the message to add the stamp code.

1 Like