This version is out of date, covering development from v4.6.0 to v4.7.1. It is maintained here only for inbound reference links from elsewhere.
Jump to the current version of aTbRef.
|A Tinderbox Reference File : Actions & Rules : Operators : Action Operator Scope : Item-based operators : links([item]).kind.[linkType].attribute||aTbRef Site Map|
|Operator Type:||Set creation|
|Operator Scope of Action:||Item|
The links() operator builds a Set from a collection of links.
selects one or more notes' links should be collected. The optional notes argument may be:
The note argument is not evaluated. Alaises can not be made the target note, even by use of paths.
The kind argument is one of these values:
and filters the directionality of the links collected.
The optional linkType argument collects only links of a specified link type, such as may be defined in the current TBX. linkType is a regular expression, so regular expression wild-card characters are permitted and retain their special meanings. If the linkType value contains white space or periods, it must be enclosed in quotes:
If linkType is left empty, links of all types are collected except prototype links. Prototype links are always omitted.
The attribute argument is the name of the attribute whose values are to be collected in the result.
constructs a set of all the titles (from Name attribute) of notes that are linked to the top-level note named 'config' via links with the link type 'supports'. For multi-word link type names use quotes:
Whilst it is likely that 'Name' will be the most usual value for attribute, it can be any currently defined attribute:
collects a set of all the values of attribute 'SchoolName' for notes that are linked to via an inbound links of type "went to".
Beware when using a TBX that has notes with duplicate (same) Name values. As a set contains unique values, if several notes have identical names, then
will list the distinct Names only once in MySet, and so the latter will have fewer values than the actual number of matching links.
|Up: Item-based operators|
|Previous: linkFrom(item[,linkType])||Next: linkTo(item[,linkType])|
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]