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
To do list forecasting (Read 1178 times)
Stephen Hay
Full Member
*
Offline



Posts: 61
Wellington NZ
To do list forecasting
Jun 4th, 2015, 8:38pm
 
Hello,

I'm trying to set up an agent that will return me a list of people I need to contact and tasks I need to complete in the next week, i.e. after tomorrow but before 7 days have passed.

I have this:
($NextContact>date("today + 1 day") & $NextContact<date("today + 7 days")) | ($DueDate>date(today + 1 day") & $DueDate<date(today + 7 days"))

but it is giving many spurious returns, including people with a $NextContact of 3 years ago (that I no longer need to contact...).

I have also tried this:
($NextContact | $DueDate)>date("today + 1 day") & ($NextContact | $DueDate)<date("today + 7 days")

but this gives no returns, even though I have a Task with a $DueDate of 10 June.

How do I set up an "after this date but before that date" condition? Is there somewhere where this syntax can be found?

Thanks,
Stephen
Back to top
 
« Last Edit: Jun 04th, 2015, 8:45pm by Stephen Hay »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: To do list forecasting
Reply #1 - Jun 5th, 2015, 3:31am
 
The first expression has unmatched parentheses and double quotes in the second part of the query (marked in red):

($NextContact>date("today + 1 day") & $NextContact<date("today + 7 days")) | ($DueDate>date(today + 1 day") & $DueDate<date(today + 7 days"))

I think you meant to try:

($NextContact>date("today + 1 day") & $NextContact<date("today + 7 days")) | (($DueDate>date(today + 1 day") & $DueDate<date(today + 7 days"))

The second specimen query is, I believe, not valid syntax, i.e. this bit:

($NextContact | $DueDate)>

You first example looks correct after you correct the typos in the code. If still no joy could you post a link to a small TBX that shows the problem. It only needs minimal test test data: something correctly found, incorrectly found and something correctly not found. It helps to have a common frame of reference plus if a stand-alone tests works but doesn't when placed back in your main TBX then it shows other factors are at play.
Back to top
 
 

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



Posts: 61
Wellington NZ
Re: To do list forecasting
Reply #2 - Jun 5th, 2015, 6:38am
 
Thanks for this, the corrections to the first code fixed the problem and I tested using the following code for a week out and it returned the expected results.
($NextContact>date("today + 8 days") & $NextContact<date("today + 15 days")) | ($DueDate>date("today + 8 days") & $DueDate<date("today + 15 days"))
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print