Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Add Numbers from inbound links (Read 963 times)
Christian Tagsold
Full Member
*
Offline



Posts: 37

Add Numbers from inbound links
Jan 07th, 2016, 5:04pm
 
Probably something simple for the pros but after a lot of tries I have to ask: I have a note with inbound links from other notes. Is it possible for $Number of this note to be the sum of all $Number of inbound linked notes? How would the rule look like?

Christian
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Add Numbers from inbound links
Reply #1 - Jan 8th, 2016, 11:33am
 
I donít think we can do this, though I've been wrong before!

Are you working on a graph theory tutorial, or have you a more practical task in mind?
Back to top
 
 
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Add Numbers from inbound links
Reply #2 - Jan 8th, 2016, 12:10pm
 
Bit busy right nowbut i think this is possible. The original question is not totally unambiguous but if I read correctly, we want a note to store the sum of all the $Number values of notes linked to it, where the later. If so, that should be poosible.

This works for me in v6.4.0:

$Number = sum(find(linkedTo(that)), $Number);

you may want to use linkedFrom vs linkedTo depending on the direction of linkage and or apply linkType filters to those calls.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Add Numbers from inbound links
Reply #3 - Jan 8th, 2016, 2:30pm
 
Yep -- there you go!  Tinderbox can do something (fairly easily) I thought it couldn't do....
Back to top
 
 
WWW   IP Logged
Christian Tagsold
Full Member
*
Offline



Posts: 37

Re: Add Numbers from inbound links
Reply #4 - Jan 9th, 2016, 7:37am
 
Many many thanks to both Marks!! First for the syntax and also for admitting that this is quite a task for pros. I do not feel that guilty for asking that way  Wink

As for Mark B. first question: I simply wanted an easy way for linking targets for chapters (and their graphical way of plotting progress) together to a statistical note for the whole text (which also plots its progress). I thought of doing this via agents collecting chapter targets but the method of computing it from links is very intuitive for starting a new document - and keeps me focused on writing enough but not too many words.
In addition I also was curious how far away from the truth my tries were - quite a bit but at least generally in the right direction somehow. These things keep me puzzled and awake at nights.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print