Filtering in Attribute Browser view

I am sorry if I am hijacking the thread but I have a similar – yet probably simpler – query. I want to filter a list of participants in an attribute browser by a certain number of occurrences of an outbound link type:

I have a list of participants of a seminar in a container (collected via attribute browser) that have links to certain courses depending on their function (participant, presentation, course work, commentary) and also their attendances (especially if they missed the class that day). I want to filter all participants that have more than 2 outbound links to courses that are labeled “missed class”. Probably this can most easily be specified via the “Query”-operation in the attribute browser and the $OutboundLinkCount but I cannot find the right operation. Can someone please point me in the right direction?

Please note, there is no implied critique in moving this to a discrete topic. But it is simply makes sense to discuss this in its true context, working in AB view, as much for the later reader as for the OP above. :slight_smile:

Now to the case at hand…

1 Like

At the risk of appearing to nit-pick, AB view views a query rather than a container, compared to Table view for example.

AB view by default uses the whole document as its scope. This can be modified in one or both of two ways (via AB view settings):

  • A discrete part of the outline (this may be the ‘container’ to which you refer)
  • An agent query, action within the above scope or whole doc if none set.

again sort for apparent pedantry, but to clarify, you seek to test links of link type “missed class”. Underlying point, the ‘label’ on links seen in map and some other views is the links ‘link type’ being also used as a visible label.

The best way it test the the count of links like so:

(links.outbound."missed class".$Name).count > 2

Like so:

Note. Method tested in v9.7.3 (public release). I explicitly tested with note using both basic and text links: links() tests both types of Tinderbox link. Happily it tests both sort of link.

Does that help?

1 Like

That did help indeed and now that I am thinking of it I might even use this prompt in a Dashboard note.

Also, your reply taught me yet another thing about TBX code. Thank you for this, too!

1 Like

Thanks, I has to think about this as it’s a less usual use of links(). My first implse was linkedTo(), but of course this is a boolean test: false if no outbound links (of type), true if *one or mure8 such links. FWIW, the same holds for linkedFrom(). To get the count of such links to then test (the original scenario) we have to use links().

Note that links() can’t concurrently test both in- and out-bound links. Thus use links().outbound .... or links().inbound ... as appropriate. I have the inbound/outbound argument for the links() currently mislabelled as optional—it isn’t. I’ll update my notes on this and add something to the links() article re counting.

Thank you again, Mark for taking your time and offer your invaluable thoughts to help me. Your solution works like a charm. However, I am trying to create a Dashboard Agent that shows a table with the $Name of the respective notes. Do you maybe have an idea how I could accomplish this? Probably by introducing $MySet to action/edict code?

Notes with Summary Tables are drawn in map view.

Your agent might be set up something like this:

Query: ($links.outbounds.'missed class'.$Name).count>2
Sort: Name (last word)

See more on map-view container tables and container plots.