I’ve been using Tinderbox for about a week so fairly new. I’m a bit lost with the differences between Action/Rule, but here’s what I’m trying to do:
I have a prototype, Task, with a custom user attribute of IsCompleted (type boolean). When a task has IsCompleted set to true , I want to style the task note title as green. Here’s what I have in the Rule for the prototype:
if($IsCompleted==true){$Color="bright green"};
When I toggle IsCompleted, nothing happens. Any ideas?
Action: runs once when a note is created in, or moved into a container.
Action edge case: Action fires once for items created on/moved onto a smart adornment.
Agent Action: the $AgentAction code fires once per agent cycle on all note matching the query, i.e. with child aliases in the agent.
Rule: runs constantly (looping through the underlying document outline). The Rule fires once per cycle, with focus on the the note being processed. Any attribute reference without an offset is thus a reference to the current note.
Edict: acts like a rule but run once: document open, edict code edit, key attribute value edits, otherwise c. once per hour. IOW, a slow-burn rule.
if($IsCompleted==true){$Color="bright green"};
So, if $IsCompleted is true set a value of “bright green”. It now stays that way until some code changes it. I think you want the latter to occur but haven’t coded for that event. So this: