Tinderbox Forum

Exporting by Attribute Value

Suppose I have a bunch of notes in a TInderbox file with user attribute Category.
Some notes have no Category assigned; others have one or more Category value as part of a set. For discussion sake let’s say we have:

Note 1 - Red, Blue
Note 2
Note 3 - Blue
Note 4 -Green

Now suppose I want to export a report of all notes with a Category value, sorted by those categories. So the output would include:

Red
Note 1

Blue
Note 1, Note 3

Green
Note 4

How what function(s) or features in the Export template would I use to achieve this?

I’d make three agents: Red Notes, Blue Notes, and Green Notes. For example, the Red Notes agent might have the query

$Category.contains("Red")

Each agent could export its children’s names in a list, and the container that holds these agents could then compile all the lists into a single export page.


Possibly easier alternative: use an attribute browser and export that. You don’t have an HTML export option for attribute browser, but you might not need one!
Reminder: Tinderbox uses semicolons to separate items in lists, rather than commas.

Thanks - I would not use the attribute browser export because the actual content of the notes will be quite complex and perfect for all of the various ^Value capabilities of Tinderbox HTML Export.

Making individual agents would work - though what I did not explain in more detail is that there will be quite a bit more than 3 categories and these categories will evolve with time. (The categories will be based on issues identified in the medical literature for various subjects.)

Thus… is there any way to automate the agents so that the reporting process automatically identifies the various values in the Category Attribute among all of my notes and then includes each category in the export report without my having to make a new agent every time for every value?

No; you’ll need to manually create agents, though it’s not hard to parameterize the agent to make this easy and pleasant.

And store the parameter in an attribute? How do I do that if I have many individual categories?