I’ve got about five timeline bands for one of my Tbx files, and I’m wondering if / how I can isolate certain bands (i.e., including some / excluding others) to view in Timelines view. Thanks!
A timeline (container) view plots all descendant notes that have a $StartDate (or user set Date-type attribute for starting date), unless the start or end dates are out of the timelines overall bounds.
Bands are a visual affordance to place in-view items on discrete horizontal layer. they have no effect on whether notes are visualised.
If, as I recall, you are using an agent as your container, you can alter the query and specify $TimelineBand values you want to exclude, e.g. …
& $TimelineBand != 2, or only include some bands, e.g. …
& ( | $TimelineBand == 3). This is a kludge though as empty bands numbered below the highest band value (lowest band on-screen) will still draw, albeit empty. Still, I suspect that’s good enough for quickly removing a band or two from the display and show fewer items.
It is worth pointing out you can make separate timeline views with different contents (i.e. differing queries) so you can toggle between different contents of the same view type just by selecting a different tab.
Thanks. I was thinking there’s probably a way to swap the container agent for a regular note - folder, then use query agents to for discrete timeline bands or the timeline band values – whichever seems best (thereby containing the notes that contain corresponding values), and then select whichever combination of timeline band / band label agents I’d like to view. I’m not exactly sure how one would “select” and view discontiguous agent selections…
Is this possible?
You can’t convert a (note) container into an agent or vice-versa, either via action code or via the UI: agent must be created as such and then remain so. Nonetheless, the approach you describe does make sense, as luckily $TimelineBand is an intrinsic attribute, allowing aliases to be paced in a different timeline band to their original.
As the timeline label is a view-scope setting (i.e. an attribute value of the container/agent holding the view) it is easier for your agent to query for a timeline band value than the band label. Why? For an a note on the timeline it needs to know, and enquire of, the view container’s $TimelineBandLabels and then find the label with the list order matching its timeline band. so setting your agent to look for a certain band number might be easier. Unless you then save the label in the note, an agent can’t query on the label.
Luckily, you already have a look-up list that lest you get the band number for a label. So, you can use this to find the band number(s) your agent wants to use in its query.
Next, you might wonder why, if you query for only notes in band
2, that your agent’s timeline has to empty bands at the top. Recall, empty lower-numbered bands are always drawn. But as $TimelineBand is intrinsic, we can fix that for the agent’s timeline. We tell the agent action to set
$TimelineBand = 0;. Won’t that affect the original? No, as this attribute is intrinsic meaning that the alias (in the agent) can have a different value for such attributes for that of its original (see the link above on the post for more on ‘intrinsic’ attributes).
No time to drill to detail now, but if you remember label names more easily than band numbers, you can a string attribute holding the desired label and make it a Displayed Attribute for that agent. The agents edict, detecting a change to the latter uses the existing look-up to get the band number for that an inserts it in a Number-type attribute. The agent’s query then uses the
agent designator to apply that value in the query. So, you simply change the desired label from the main container-based timeline in the agent’s Displayed Attributes and the edict or rule you set automates the rest to update the agent query.
The query action is unchanged by the change of query as you always want the aliases in band zero. Of course if you want to look at two or more bands, then the agent’s action could test for the $TimelineBand of the original of the alias and apply a new band number accordingly. So you might query for bands 2 and 4 of the original but in the agent display 4 as band 0 (top band) and 2 as band 1, thus changing the numbering and order of the displayed bands.
Powerful stuff, but some assembly required. (@satikusala, we should discuss tutorial/demo aspects of this).
Thank you. This is a lot to process, and I’m trying to understand how all of this would work. If I’m following you properly, it sounds like one can create various kinds of query code for timeline bands – for discrete bands and a combination of bands.
I understand that one can create an agent that can contain query codes for complex timeline band combination. Thanks for your explanation about how this can be accomplished.
If I wanted to create agents with query code for discrete timeline bands / timeline band labels (i.e., one agent per timeline bands), is it possible to select and view discontiguous agents (containing notes with timeline values) in Timeline view?
I realize this is complex, and might a tough lift, but since it is possible for action code to create an agent through createAgent(…), would it be possible to write a code that could auto-generate agents based on the creation of discrete timeline bands / timeline band labels? For instance, could one set up an action that would query notes with timeline bands containing values, e.g.,
4– or timeline band label values, e.g.,
Pleistocene– and automatically generate individual agents per each discrete value?