Tinderbox Forum

Include the counts from series of agents in a summary note

I’m far away from any karmic balance I must say - still a complete beginner when it comes to the export codes. I understand how I can reference the attributes of the current note, but how to I reference and list the attributes of the children ?

Building on the above I would like to summarise the names of the child notes within a given container as a list. Here my poor attempt:

What you want to do is


which exports each child of this note in turn, using the specified template. You’d typically have a simple template like this:

^value($Name), ^value($Latitude), ^value($Longitude)[return]

Thanks - I was always confused how to use export codes for multiple notes as for this case. Applying a template to each note in turn to extract the needed info makes intuitive sense.

Further to the last,…

^value()^ can be used to insert the value of a single attribute from the current note, or another note via an offset reference.

To insert the value of entire note(s) into the current note, there are two export codes: ^children^ and ^include()^. In each case, the ‘included’ content is the source note as processed either via its inherited or set export template, or using a template passed as part of the code. The codes differ in the scope of possible source notes they can address:

  • ^children^ can only draw from child notes of the currently processed object. In other words it allows a container (or agent) to address its immediate children.
  • ^include()^ is used for any relationship to the target notes other than parent/child.

Hi @mdavidson. Taking the feedback from above I’ve updated my test file that you can deconstruct to make this work for you. Note how I’m pulling the children from XYZ and QRS into ABC, and applying a different set of variables.

Be sure to remember that you need to correct the autocorrecting of smart quotes and be sure to use straight quotes in your include.

Here is the TBX file: include-test4.tbx (112.7 KB)

I’m starting to understand some basics now with the help of @satikusala, @mwra and @eastgate. Here an example tip toeing my way forward.

The container

and my minimalistic template to start

Pushing on preview in the Container window I get

So close. Just wondering how to get specify return so that the names of the notes form a column rather than a row ? Adding a return to the template did not help.

Hey there, try this. In your HTML code insert a


after ^value($Name). This will insert a line break.