Operator Type:
Operator Scope of Action:
Operator Purpose:
Operator First Added:
Operator Last Altered:
Operator Uses Scoped Arguments:
Operator Has Optional Arguments:
Function [other Function type actions]
Item [operators of similar scope]
Query Boolean [other Query Boolean operators]
Baseline
As at baseline
linkedTo(scope[, linkTypeStr])
A boolean test at returns true
if the current note has a least one link to any of the note(s) defined by scope; this is optionally filtered to only links of type linkTypeStr. Put another way:
- "Does an outbound link exist from the current note to any of scope's item(s)?".
or
- "Do any of scope's item(s) have an inbound link from the current note?".
As this is effectively only a query term, (with a Boolean result), if trying to collect data about the linked note(s), use links() instead.
scope defines a group of items in a number of ways. An additional option to normal group descriptors wildcard designator *
that matches all notes in the document and replaces the normal "all" group designator.
For linkTypeStr, links of type 'prototype' are ignored. Used in an agent, 'this' note is the alias in the agent and not its original, making this action unsuitable for testing in an agent action. If using linkTypeStr, you must use the value "*untitled"
to match an 'untitled' type link (rather than an empty string, "", or "untitled").
Thus, to test if any note using the 'Event' prototype has an inbound link of the 'untitled' link type the agent query would be:
$Prototype=="Event" & linkedFrom("*", "*untitled")
The logical opposite of this test is linkedFrom().
This function can match a link from an alias as opposed to an original (if the logical choice).
Legacy issues
This replaces the legacy #linkedTo query operator (deprecated since v4.6).