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 >> agent query for tasks in a certain week
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1419903641

Message started by JRL on Dec 29th, 2014, 8:40pm

Title: agent query for tasks in a certain week
Post by JRL on Dec 29th, 2014, 8:40pm

Thanks for any help in advance.

I'm attempting to use an agent to seek all "done" tasks in a certain week. This can be bounded by days or set to a week of the year "week 42", doesn't matter to me.

Right now my agent can query a day:
AgentQuery=format(StartDate,m-d) == "12-28";

But I'm not sure how to set it up for a week. I didn't find any reference to a week number in formatting the date. If I could use the week number in formatting the date range, that would be simple.

Alternatively I could query a date range, again not obvious to me how I would format that in a query.

Thanks again.  

Title: Re: agent query for tasks in a certain week
Post by Mark Anderson on Dec 30th, 2014, 4:09am

I don't believe there is an action code to get a numerical week of the year (or numerical day of the year). I guess at this point it's a feature request.

I suspect the query you cite may run a little faster as:

  $StartDate.month=="12" & $ StartDate.day=="28"

You might be able to use runCommand to check and then cache in an attribute the week number of items with $StartDates. But do not do that oparation within a query as it may slow TB down a lot.

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.