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 >> To do list forecasting
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1433464737

Message started by Stephen Hay on Jun 4th, 2015, 8:38pm

Title: To do list forecasting
Post by Stephen Hay on 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

Title: Re: To do list forecasting
Post by Mark Anderson on 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.

Title: Re: To do list forecasting
Post by Stephen Hay on 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"))

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.