Tinderbox Forum

3rd child note expression

Hello there, i would like to express the text of a 3rd child note into a table. How can i do this please?
Example : First note is “something about National standard”
1st child note is “audit practice against standard”
2nd child note is “findings”
3rd child note is “actions to improve practice”
I have spent hours trying to get 3rd note in the 3rd column of my table, but in vain. I am using the ^ sign.
Thank you.

Look at the designator, child[N]. There you will see that any child can be referenced using a zero-based sibling order. Thus child[0] is the first child. Therefore you want child[2] for a reference the third child.

This inserts the $Text of child #3 into an export template:


Does that help?

1 Like

Amazing thank you. Does this mean we can have as many ‘child’ numbers? Or would it be best to create a prototype name p_action and have the expression as ^value($Text($Prototype== p_action))^.
Sorry i’m new to tinderbox. I recently purchased it and seems to have opened a new world for me. Thank you.

If I understand correctly, by which I mean you can’t do something like child[5-7] to imply ‘children 5 through 8 inclusive’. But we’re heading down the wrong track here.

In plain ‘english’, i.e. not in code but written text, what do you want your template to do. If it is easier, upload a little text TBX file with specimen data and a note manually set to show the outcome you want to achieve.

It’s late here in Europe so I may not see any replies until tomorrow.

to put that in valid (but not necessarily working) code:


This would return a List where each list item is the complete $Text of one of the note’s whose Prototype is “p_action”.

To use a list in your export you’d need to do some more formatting, so lets fix the first problem above before addressing this.

Dear Mark, apology, I went to sleep too - I am also in the UK. I am uploading an example of the TBX file. Please forgive me it looks very amateur. Please feel free to improve and make suggestions. I am very keen to learn. Thank you.
Much appreciated.
GapAnalysis MHP.tbx (154.3 KB)

1 Like

Hi, thanks. I’m currently travelling back from Hypertext’22 Conference in Barcelona and I’ll try and follow up once back home.

Thank you Mark. Much appreciated.

I’ve googled ‘Gap Analysis’ and it all seems rather vague business process. What is the actual point of this task?

IOW, what, in actionable terms in Tinderbox, are you trying to do? This might help the community here (many of whom aren’t in the same filed of work) to help you. I’m not trying to be harsh, but whilst we all do different things in our work, many of oure meta-ideas/process do translate, if it is clear what the actual task is. :slight_smile:

Defined as a task and not a process, we might help you get more traction.

Hello Mark. Thank you for your reply. I work in healthcare, specialist in blood transfusion. The National Institute for Health and Care Excellence (NICE) made some recommendations on the subject. So, i’d like to assess our hospitals performances against these recommendations.

So it should appear as :

1st note - Recommendation 1

2nd note - findings of the assessment of our hospitals against recommendation 1 (compliant or not compliant)

3rd note - evidence of the findings

4th note - action required to be compliant (with an action owner, target date and completion date)

The Html table will have all the above in columns for each recommendation:

Column 1 - recommendation 1

Column 2 - text of note 2

Column 3 - text of note 3

Column 4 - text of note 4

Column 5 - $actionOwner of note 4

Column 6 - $targetDate of note 4

Column 7 - $completionDate of note 4

Thank you. Much appreciated.

OK. I think it’s really helpful in situations like this one to talk about the actual problem, or something like it, rather than abstracting out all the lovely details.

I’ve got too little connectivity just now to look carefully at the details, and I think progress will be rapid without me. But things I’d normally want to know at this point are:

  1. How many recommendations do you expect? Six or seven, or several hundred? Or, perhaps, six now, and another six next month, and another six every month?

  2. Do you want other tables or summaries? Say, a report on how many times you’re FOR and AGAINST the recommendation?

  3. Do you care about the graphic design of the report? If you do, I’d suggest making a mockup of how it might look.

  4. Tinderbox composites were invented for this sort of task. Now, it’s possible that (a) using children is easier here, or (b) composites are unloved because they’re just not good enough. But I might give them a thought.

Thanks, so, to map you description, we:

  • export the Gap analysis as an HTML page opening an HTML <table> including child note(s) that are Recommendations, then calling each child
  • when processing the recommendation note , e.g. note ‘1.1’ in your demo, for each recommendation we per row add:
    • Table Column 1 - the $Name of the child note
    • Table Column 2 - the $Text of the first child of the recommendation (i.e. ../1.1/Findings)
    • Table Column 3 - the $Text of the second child of the recommendation (i.e. ../1.1/Evidence)
    • Table Column 4 - the $Text of the third child of the recommendation (i.e. ../1.1/Actions)
    • Table Column 5 - the $Owner of the third child of the recommendation (i.e. ../1.1/Actions)
    • Table Column 6 - the $TargetDate of the third child of the recommendation (i.e. ../1.1/Actions)
    • Table Column 7 - the $CompletedDate of the third child of the recommendation (i.e. ../1.1/Actions)
  • then closed the table and page.

So in your TBX:

So inferred from the descriptions, something like this?

@eastgate’s points hold true, this is just a sketch.

Further to my previous post, the last grab is of an HTML <table> with limited styling for visual sense.

Notice how your data comes from three levels in your specimen document rather than the two levels in your description. I note that not as critique but a reminder of how easy it is to confuse oneself when planning your data.

I’m assuming the plan here is either export or export and internal (HTML) preview. You get the latter for free anyway if only doing the former. That said, if you want to use a styled preview only in-app, that’s fine too though the same techniques are used.

In your TBX doc, you use of prototypes is well planned. It allows you to check notes are of the right ‘type’ for including in the report and consistently formatting (e.g. Displayed Attributes) for similar purpose notes.

Here is your TBX with the templates used for the above. I also had to add some specimen $Text to notes to make the table make sense when viewed.

GapAnalysis MHP.tbx (193.4 KB)

Note, there are other ways to make the table, there is no single ‘correct’ way. But, with the document layout and table logic as it is you ware going to be using some form of include (via ^children()^ or ^include()^).

Dear Mark, I cannot thank you enough. This is amazing. I have spent all evening playing with this template…I have done a bit of reverse engineering to understand the concept. You have opened a new world for me. Tinderbox is so versatile and yet very powerful.
I have added a new prototype for recommendations, which means I can reference them in my writing,
I am ever so grateful. Thank you.

1 Like

My pleasure. Tinderbox has much richness but it can be overwhelming.

Tip, as hopefully illustrated by the template’s method of working, if using export (even if only for internal preview), think about your note nesting. By testing prototype type in a template you can avoid note siblings that aren’t of the required type, e.g. a general note amongst your numbered requirements.

Thank you. Mark Anderson nailed it. There are several recommendations and standards within my field, as you can imagine. I have modified the template Mark A sent me to further suit my needs. Thank you for such a fantastic software - So exciting to learn more.
Much appreciated.

Understood. Thank you very much.