Operator Type:
Operator Scope of Action:
Operator Purpose:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Operator Uses Scoped Arguments:
Operator Has Optional Arguments:
Function [other Function type actions]
Item [operators of similar scope]
Linking [other Linking operators]
v9.1.0
Baseline
As at baseline
createLink(sourceItem,destinationItem[, linkTypeStr])
The operator createLink() can be used for link creation. This is useful when neither the source nor the destination of the link are this note. The arguments sourceItem and destinationItem must be defined so as to identify a single (existing) item.
Example:
$MyList2.each(anItem2){
$MyList.each(anItem1){
createLink(anItem1,anItem2);
};
};
createLink() may also cope better than linkTo() and linkFrom() with the edge case when a note's $Name (or those of other notes in the note's path) contain forward slashes. Such paths are challenge as in string form the differing meaning of the use of slashes (container delimiter vs. note title) is ambiguous to the parser.
Optionally, a link type for the new link may be specified suing linkTypeStr. If that link type does not exist, it is created.