How to select certain timeline bands to view?

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.

1 Like

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?

Thanks.

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).

1 Like

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.

Two questions:

  • 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., 0 / 1 / 2 / 3 / 4 – or timeline band label values, e.g., Oligocene Miocene Pliocene Pleistocene – and automatically generate individual agents per each discrete value?

Thanks again.

I went ahead and created 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 seem to remember seeing examples on the forum where users created folders that grouped certain timeline bands (I don’t recall if they were containers and agents), and then were able to select and view discontiguous containers in Timeline view.

I welcome any ideas / suggestion on how one can best accomplish this.

Thanks very much.

See my last answer above, which addresses this in some detail. Where are you getting stuck?

If I understand you properly, you’re suggesting an approach that involves creating query code that would include whatever combination of timeline values I’d like to include. While that’s a fine solution, I was wondering if there’s another, possible approach.

I thought I saw some examples on the forum in which users were able to select folders of notes that contained timeline band values so they could isolate and view view them – rather than having to create query code for a combination of timeline band values. Was just wondering if that kind of approach might be possible.

Perhaps. But it would help if you could search and link to them. Then we have a reference. It might be the threads, when found, describe the solution saving us all a do-over.

1 Like

That’s exactly that I’m doing right now. Here’s one of the posts I was looking at…

Sure, so where—at what precise step—does that not work for you?