This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

Incorrect link counts & prototype links

Both $InboundLinkCount and $OutboundLinkCount include 'prototype' link type links but this is not generally the user's expectation.

For any note with a prototype set, the true inbound count is $InboundLinkCount - 1.

For any prototype, the true outbound link count is count(links().outbound..$Name)

As a side note, Roadmap view includes 'prototype' link type links.

Assuming two Number-type attributes $TrueInboundCount and $TrueOutboundCount, a rule or agent action might apply this logic:

if($Prototype){$TrueInboundCount=($InboundLinkCount-1)}else{$TrueInboundCount=$InboundLinkCount};

if($IsPrototype){$TrueOutboundCount=count(links().outbound..$Name)}else{$TrueOutboundCount=$OutboundLinkCount};


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Import/Export/Formatting : Incorrect link counts & prototype links