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
Applying actions conditionally to alias's original (Read 966 times)
Derek Van Ittersum
Full Member
*
Offline



Posts: 168

Applying actions conditionally to alias's original
Jan 11th, 2016, 12:26pm
 
I'm trying to craft an agent action that will have the following effect:

if the original note was descended from /Projects/Work/Research, then set the TimelineBand to 1

This action code in the agent doesn't seem to be doing what I intend:

if(descendedFrom(original)("/Projects/Work/Research")){$TimelineBand=1}

I also tried:

if(descendedFrom("/Projects/Work/Research")){$TimelineBand=1}


Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Applying actions conditionally to alias's original
Reply #1 - Jan 11th, 2016, 1:04pm
 
Use $Container(original) for your test.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Derek Van Ittersum
Full Member
*
Offline



Posts: 168

Re: Applying actions conditionally to alias's original
Reply #2 - Jan 11th, 2016, 2:03pm
 
I hadn't thought to add the .contains operator to the $Container attribute. This achieves what I was hoping:

Code:
if($Container(original).contains("/Projects/Work/Research")){$TimelineBand=1} 



Thanks Mark!
Back to top
 
« Last Edit: Jan 11th, 2016, 2:12pm by Derek Van Ittersum »  
  IP Logged
Pages: 1
Send Topic Print