Tracking progress in summary tables

Summary tables are useful not only for quickly seeing what’s in a container but also for tracking progress. I have a container that has one note for each major person discussed in a book I’m writing. Each of these is also a container that may contain up to 4 children each of which is an agent that follows a different prototype. E.g., one prototype collects aliases identifying where in the main text the person is discussed; another identifies the sources of information about that person. What I’d like to see in the summary table for the person container is the number of grandchildren of each type; i.e., the ChildCount for each of the 4 agents. I’ve tried a variety of expresions but none that return the correct values.
Also, a minor point, a Tbx Ref contains one entry for “Container Table” and one for “Summary Table.” It would be helpful to have both use the same name.

Sure, checking app Help, “Summary Displays” is the approved term. So, 10 edited notes several new links later, aTbRef is using one term for this.

It’s not entirly lack of attention. Some terminology has drifted in the app’s twenty (!) years of life.

Meanwhile, … Summary tables summarise children by type of grand-child. Here’s a way.

A very simple trial using 4 prototypes. Here’s my table:

The $TableExpression for each column using the prototype. Thus for ‘Red’:

sum_if(children,$Prototype=="red",1)

Thanks. I had used that syntax to determine the presence of children of each prototype in each person-container. (Another artifact of time: sometimes there was more than one child with the same prototype) When I substituted the name of the prototype of the aliases in a child it gave the count (1) of children containing aliases of that type. However, using ‘descendants’ rather than 'children in the sum_if(…) returns the count I’m looking for.

I don’t quite follow. By design an agent de-dupes, so a a note and some of its aliases are in scope of the query, the agent will only list the note once, always favouring the original over the alias if both are present.

I’m confused by the reference to descendants seeing that you asked about grandchildren. The code shown is evaluated against the children of the note XX illustrated above, ergo, note XX’s grandchildren. You don’t have to use a prototype assignment as the test, that was just an example.

The person container is not an agent. It is meant to hold up to 4 different agents related to the person. In developing the Tbx file, I experimented with different agent queries, rules & edicts. Thus, the person container could wind up with more than 1 agent with the same prototype. Thanks to the summary display, I was able to eliminate all the early trial versions quickly.

Looking at the method you suggested, it seemed perfect. I don’t know why it returned only “1” in my file, but using ‘descendants’ worked fine, also enabling the deletion of a lot of dross in a very short time.

1 Like

Thanks. Glad you’re past that road block. Do ask if stuck again.