Tinderbox Forum

Creating a "summary" stamp (collecting $Text from all notes descending from its parent)

Hi. This seems simple, but I can’t seem to get the grasp of it.
I’m trying to create a “summary stamp”. When executed on a “Summary” note, that note’s $Text should become the concatenation of the $Text of all notes descending from its parent.

Eg. with this outline:

--Chapter A (text: "First Chapter")
--Chapter B (text: "Second Chapter")
----Text B1 (text: "Lorem")
----Text B2 (text: "Ipsum")
----Summary (text: to be defined by the stamp);

when applying the stamp to “Summary”, it’s $Text should become:

Second Chapter

I can’t seem to get the find / descended from query work. I’m using this but I don’t get a consistent result:

$Text = format(collect_if(find(descendedFrom(parent)), !$IsAlias, $Text),"\n\n")

but replacing “parent” by the actual name does work:

$Text =;
$Text = format(collect_if(find(descendedFrom("Second Chapter")), !$IsAlias, $Text),"\n\n")

Any insights?
Thank you!

As I recall, inside the find() statement, this is the note being tested; everything is descended from its parent, except that top-level notes don’t have a parent and aren’t.

I wonder if export might be a better solution to your problem? Also, some features of the next release may help with this as well.

Hmm I was thinking of this more like a “summary-in-progress”, i.e., not meant to export to other application, but to keep working within Tinderbox.
If you’re familiar with Scrivener, I was trying to get something like “scrivenings mode” - view all text descending from a particularly selected group.

Would still like to know if there’s a solution, for “educational purposes”. But found a much more simpler way to do it by using the stamp rule


on the “Chapter B” note. Makes much more sense…

I think rather than “parent”, you wanted find(descendedFrom(parent(that)))…

Busy on a submission deadline, but this and this might help fill some gaps.

Thanks. I really need to learn “that” better :sweat_smile: