Tinderbox Forum

How could i move a note to a "archive" container?

I have a user attribute that is called “archive”, it is boolean. I have notes in a container called “/Clients” (also the “archive” container is within this). So when I mark something as archive I would like it to go automatically into the archive container. I tried this: $Archive=true,$Container="/Clients/Archive"; --> this does not work nor does this if$Archive=true,$Container="/Clients/Archive"; I dont know if I would need this to be an action or rule and do I need to put it on ever single note (via prototype) or on the parent container??? Thanks in advance.

Tinderbox separates actions with semicolons, not commas. You want

if ($Archive==true) {$Container="/Clients/Archive";}

This would be a rule, which each archivable note might inherit from its prototype. Alternatively, you might use an agent:

. Query: $Archive==true;
Action: $Container(original)="/Clients/Archive";

Note that in an agent, this note is the alias the agent has created, so you want to move the original correspondent to that alias.

An alternate way to work, incidentally, would leave the archived notes in place — perhaps sorting them out of the way — and use an agent to catalog all the archived notes.

(Notice that Tinderbox uses a double equals symbol “==“ to test for equality. The single “=“ assigns values)

Thanks

Thanks for the assistance that worked.

Also - What if I wanted a specific note excluded from this rule how would I add it to this rule (an exclusion)? Thanks in advance again.

Something like this:

if ( ($Archive==true) & {$Special!= true) ) {$Container="/Clients/Archive";}

This will move the note if $Archived is true, but only if the note is not special — that is, $Special is not true.

Thanks, I appreciate it. The only thing I adjusted was this, in bold: if ( ($Archive==true) & ($Special!= true) ) {$Container="/Clients/Archive";}

HI Mark,

If I do want to move the original note with Archive property & not the alias , what should be done?

If I do want to move the original note with Archive property & not the alias , what should be done?

Set $Container(original) rather than $Container(this)

1 Like

Thanks again for the help. This is the final product - a boolean user attribute call Archive that when toggled will move the note in or out of the archive folder -->if(($Archive==true)&($IsPrototype==false)){$Container="/Clients/Archive/";};if(($Archive==false)&($IsPrototype==false)){$Container="/Clients/";};

1 Like

Scott,
If you can , please share you file for us newbies , so we can play around with it as well.

Sorry I cannot share that - it has private information.