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 >> Boolean prototype question
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1435253860

Message started by Barbara Snyder on Jun 25th, 2015, 1:37pm

Title: Boolean prototype question
Post by Barbara Snyder on Jun 25th, 2015, 1:37pm

I'm tracking my job search. I have a boolean field "Applied" in my prototype. I added this rule:

if ($Applied==false){$Color="red"} ;

But it's turning all the titles red, even those where I have checked Applied.

If I apply the rule to an individual note, it works.

I haven't written much code lately and am wondering if I am just overlooking something very simple. Is it doing this because it's evaluating the value of $Applied in the prototype instead of in the note itself? If so, is that how it's supposed to work?

Thanks -- Barbara


Title: Re: Boolean prototype question
Post by Mark Anderson on Jun 25th, 2015, 2:06pm

In the prototype's Action Inspector, un-tick the enabled box ($RuleDisabled). this stops the prototype setting it's $Color to red which then get inherited.  Once you've fixed the prototype, reset the $Color in the notes using it and you should find the $Color sets correctly.

This is a very good example of why you often don't want a prototype to run its rule on itself.

Title: Re: Boolean prototype question
Post by Barbara Snyder on Jun 25th, 2015, 2:15pm

Thanks so much! That works.

-- Barbara

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.