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
Boolean prototype question (Read 1135 times)
Barbara Snyder
Full Member
*
Offline



Posts: 80

Boolean prototype question
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

Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Boolean prototype question
Reply #1 - 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.
Back to top
 
 

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



Posts: 80

Re: Boolean prototype question
Reply #2 - Jun 25th, 2015, 2:15pm
 
Thanks so much! That works.

-- Barbara
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print