Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> Linking between notes with matching attributes
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1435274243

Message started by B.Moreira on Jun 25th, 2015, 7:17pm

Title: Linking between notes with matching attributes
Post by B.Moreira on Jun 25th, 2015, 7:17pm

Still grasping the basics of TBX, help really appreciated!
I am trying to link, in the map view, "Authors" to their "Quotes".

"Authors" notes and "Quotes" notes are in different containers and are gathered by an agent "YYY" as aliases.

I would like the aliases of "Authors" linkTo every aliases of "Quotes" where attribute $Name of the Authors' (origin of link) matches the attribute $Author of the Quotes (destination of link).

(Hope I'm being clear)

For ex. I have an Author alias with $Name = "Author1" and a Quote alias with $Author = "Author1" inside the "YYY" agent.

If I try the following rule in the Author alias' it works:


Code:
inside("YYY") & linkTo(find(inside("YYY") & $Author="Author1"))


But if I try to reference the $Name of the origin of the link, it doesn't (I must be getting the reference behavior wrong):


Code:
inside("YYY") & linkTo(find(inside("YYY") & $Author=$Name))


All help appreciated, it must be a simple solution but I'm not reaching it...

Title: Re: Linking between notes with matching attributes
Post by B.Moreira on Jun 26th, 2015, 2:38am

Found the solution in the manual: $Name(that). I had used $Name(this) but they are for different things. Hurray.  :)

Title: Re: Linking between notes with matching attributes
Post by Mark Anderson on Jun 26th, 2015, 3:05am

Glad you're sorted out.  For later readers, a bit more on the 'that' designator.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.