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
NOT in the next three days (Read 5670 times)
Matt Cawood
Full Member
*
Offline



Posts: 109
New England, Australia
NOT in the next three days
May 08th, 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)



Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: NOT in the next three days
Reply #1 - 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.
Back to top
 
« Last Edit: May 8th, 2008, 6:07pm by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: NOT in the next three days
Reply #2 - 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))
Back to top
 
 
WWW   IP Logged
Matt Cawood
Full Member
*
Offline



Posts: 109
New England, Australia
Re: NOT in the next three days
Reply #3 - 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
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print