Tinderbox Forum

Attribute list based on child notes

I’d like to use the names from the children of a note as an attribute list for a prototype. Ideally I’d have a note at the document root with children representing attribute names. E.g., I have a Note called “Clients” its children would be “Company 1, Company 2, etc.” I also have a prototype with a user attribute of “ClientName” which would show a list of clients based on the children of “Clients”. This way I’m using the outline view to keep the client list updated and I could make notes about the client.

I’m sure I’m not explaining this correctly, apologies.

Prototype’s Rule:

$ClientName = collect(children("Clients"), $Name);

N.B. assumption: the $Name ‘Clients’ is unique across the whole document. If not you will need to use the full $Path for that note in the above rule.

Does that help?

1 Like

This is a great plan. I do this a lot.

BTW, I do this a little differently. I have a configuration note that I use to process these types of $Rules and/or $Edicts, that way the Rule/Edict only has to run on one note, and the rest of the notes benefit.

1 Like

:grinning: Thank you both very much; this worked perfectly.