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 >> Applying actions conditionally to alias's original
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1452533211

Message started by Derek Van Ittersum on Jan 11th, 2016, 12:26pm

Title: Applying actions conditionally to alias's original
Post by Derek Van Ittersum on 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}



Title: Re: Applying actions conditionally to alias's original
Post by Mark Anderson on Jan 11th, 2016, 1:04pm

Use $Container(original) for your test.

Title: Re: Applying actions conditionally to alias's original
Post by Derek Van Ittersum on 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!

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.