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 >> NOT in the next three days
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1210249911

Message started by Matt C. on May 8th, 2008, 8:31am

Title: NOT in the next three days
Post by Matt C. on May 8th, 2008, 8:31am

I surrender. What's the syntax for "don't pick up notes with a 'deadline' in the next three days, or today, or has passed"? ('deadline' being a user date attribute)




Title: Re: NOT in the next three days
Post by Mark Anderson on May 8th, 2008, 10:05am

So, restating the date argument you want to look at dealines more than 3 days from now? This works for me:
Query: MyDate>today+3days

Add other params as required:
Query: (MyDate>today+3days)&(Deadline="due")

Note that the date check is not time-aware; although MyDate has a date+time value only the date portion is used in the query. You can prove this by altering the time of a note borderline for inclusion were time being taken into account, 'today + 1 day' is all of today and tomorrow. If now is 11:00 am, a note for tomorrow 4:00 pm would still match. [post edit. This isn't strictly true.  time is used for comparisons except when using the '=' operator (see manual p.114).]

Tip, start the query with the most constraining data - here we only check the Deadline for items that we know are greater than 3 days hence.

Title: Re: NOT in the next three days
Post by Mark Bernstein on May 8th, 2008, 12:26pm

Another tip:  perhaps you already have an agent Soonthat gathers all the tasks that ARE due in the next three days.  If so, you can save some work by reusing the agent!

    Prototype=Task & (! #inside(Soon))

Title: Re: NOT in the next three days
Post by Matt C. on May 8th, 2008, 4:52pm

Thanks, Marks. I went with the Bernstein solution: perfect. I sometimes despair of my grasp of agents, but the solution, when it arrives via my own cack-handed efforts or from external help, always restores my faith in Tinderbox's roll-your-own approach.

That said, I'm about to post another agent question ...

Matt

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.