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
Using $Container to archive completed tasks (Read 1684 times)
Dominique Renauld
Full Member
*
Offline



Posts: 73

Using $Container to archive completed tasks
Nov 24th, 2016, 9:28am
 
Hi everyone! I am searching for a trick that would allow me to ask Tinderbox to put a specific task into another $Container when that task is completed and marked as « checked ». Does anyone know how I could do that?  For the moment, I have created the following agent :

Code:
Query: $Checked="true"
Action: $NameStrike="true";$Color="bright green";$Badge=""
 



But when I ask Tinderbox to put that checked task into another container, my task goes logically into the agent’s container. What could I do? Thanks for your help.
Back to top
 
« Last Edit: Nov 24th, 2016, 9:30am by Dominique Renauld »  

Twitter : @dominiq_renauld
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Using $Container to archive completed tasks
Reply #1 - Nov 24th, 2016, 10:07am
 
In queries, test equality with '==' not '='. The latter works for legacy support but may not always do so. Also, if testing a Boolean type attribute, don't use quotes or you're not testing quite what think, though it does seem to work here (probably legacy support again. Ideally use:

$Checked == true

I hope I've understood the problem correctly. It seems the problem you are likely seeing is that you're moving the alias in the agent to the new container and not the original note that alias represents.

Let's assume you want to move complete tasks to a container at path /Jobs/Completed. We can place that in the agent's $MyString (or  String type attribute of your choice) and then have an action:

$NameStrike=true;$Color="bright green";$Badge=;$Container(original)=$MyString(agent);

Note the syntax corrections for $NameStrike (no quotes) and $Badge (reset to default vs. no value/empty string).

In the action above, the '/Jobs/Complete' container doesn't need to exist. As long as you've stored the whole path Tinderbox will check it exists and make it for you before placing the first complete task in it.

But, perhaps you want different sorts of notes to go to different containers. I can think of several approaches. The first is to store the target container string in an attribute in the notes the agent is checking. If you use prototype for each type of note, you only need to set that value in the prototype. Then the agent action becomes:

$NameStrike=true;$Color="bright green";$Badge=;$Container(original)=$MyString;

We don't need to use $MyString(original) as $MyString is not intrinsic and so the original note and the alias upon which the agent acts share the same $MyString value.

A second approach would be to use conditional code in the agent action but if you've more than 2-3 target containers you end up with lots of conditional clauses. So, I recommend the suggestion above.

I hope that helps.
Back to top
 
 

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



Posts: 73

Re: Using $Container to archive completed tasks
Reply #2 - Nov 24th, 2016, 1:33pm
 
Thanks Mark for your help. In the situation that you precisely describe and which I've just tried on a separate file, when I ask Tinderbox...

$NameStrike=true;$Color="bright green";$Badge=;$Container(original)=$MyString(agent);

... in the $Checked agent, I obtain aliases of my notes and the original notes at another place of my file. What I am searching for would consist in moving an original note in a different container as soon as $Checked is true. In this way, I could keep an archive of my notes and, in the same time, suppress automatically the aliases.  
Back to top
 
 

Twitter : @dominiq_renauld
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Using $Container to archive completed tasks
Reply #3 - Nov 24th, 2016, 3:23pm
 
So the right note is moved to the right place but an alias still shows in the agent? If this is what happens, we need to reset $Checked in the action:

$NameStrike=true;$Color="bright green";$Badge=;$Container(original)=$MyString(agent);$Checked=false;

As an extra precaution, you could set the target container to have this $OnAdd:

$Checked=false;

Now, any original note moved to the container is not checked and can't match the agent query (which is looking for checked/ticked notes).

Back to top
 
 

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



Posts: 73

Re: Using $Container to archive completed tasks
Reply #4 - Nov 24th, 2016, 4:08pm
 
It works! But if I want to have a container - not an agent, not aliases - which would gather all my notes whose the checked attributes would have been filled? Indeed, for the moment, the checked notes in green are not gathered into a container. They are at the last place within my notes as you can see on the screenshot below.

Back to top
 
 

Twitter : @dominiq_renauld
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Using $Container to archive completed tasks
Reply #5 - Nov 24th, 2016, 4:34pm
 
Quote:
But if I want to have a container - not an agent, not aliases - which would gather...

But this is exactly what agents are for: containers don't have queries. Is there a reason you can't use an agent or is it a cosmetic issue of not wanting to see the agent in your outline? If the latter, consider placing the agent in a container and collapsing it so you don't have to see the agent.

The reason you're moved notes are going to the root is likely because the value you're setting for their $Container is "", i.e. nothing, no value. It may be you are referring to the wrong attribute to fetch the path of the data or you haven't put a value in that attribute. Without seeing all the code involved it's hard to diagnose further.
Back to top
 
 

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



Posts: 73

Re: Using $Container to archive completed tasks
Reply #6 - Nov 24th, 2016, 4:57pm
 
OK. I am going to create an agent to gather my completed tasks into it and suppress these manually. Anyway, I need to visualize my completed tasks on my timeline view. Many thanks for your advices and suggestions.
Back to top
 
 

Twitter : @dominiq_renauld
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Using $Container to archive completed tasks
Reply #7 - Nov 24th, 2016, 5:02pm
 
Quote:
and suppress these manually


I'm not quite sure what that means but it sounds like you are able to move ahead. Do ask again if stuck. Good luck.
Back to top
 
« Last Edit: Nov 24th, 2016, 5:02pm by Mark Anderson »  

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



Posts: 73

Re: Using $Container to archive completed tasks
Reply #8 - Nov 24th, 2016, 5:41pm
 
Thanks for your encouragements! The fact is that I was searching for a process which could allow me to "mirror" the way I used some specific tasks apps features such as "Done" in Omnifocus for instance: you check a task as "done" and the task automatically disappear from its original section to move into an archive folder. But I can also do it gradually. That's what I meant. Anyway, I definitively switched to Tinderbox for gathering my tasks and projects and I try to adjust it at best according to my needs.
Back to top
 
« Last Edit: Nov 24th, 2016, 5:42pm by Dominique Renauld »  

Twitter : @dominiq_renauld
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Using $Container to archive completed tasks
Reply #9 - Nov 25th, 2016, 5:05am
 
That all makes sense. I suspect Omnifocus is essentially using a hidden agent-like process to achieve that effect. If a downside in Tinderbox is you have to set up that process, the upside is you've more control over the process, e.g. to set extra data. For instance, if you set a $StartDate when you commended a task, the 'checked' agent could also set the current date as $EndDate, as part of the agent action. Then in your timeline of done tasks you could see the start, end and duration of tasks.

Taking the idea further, instead of setting $EndDate you could set the current date in a custom Date attribute. As timelines let you choose custom Date attributes to use for plotting the data on the timeline ($StartDate and $EndDate are defaults) you can have date in your task notes to support different timeline rendering.

I'm not suggesting you need to this, I describe it just to show the flexibility agents offer.  Smiley
Back to top
 
« Last Edit: Nov 25th, 2016, 5:06am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print