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 >> note set start/end date based on children's dates
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1388713314

Message started by JRL on Jan 2nd, 2014, 8:41pm

Title: note set start/end date based on children's dates
Post by JRL on Jan 2nd, 2014, 8:41pm

I'd like to have a higher level task set its start/end dates based on finding the lowest child start date, and highest child end date. I tried:
$StartDate=min(children, $StartDate)

but it didn't set the result as I might expect. Do I need to add something to allow evaluation of a data as a minimum number? Thanks....

Title: Re: note set start/end date based on children's dates
Post by Mark Anderson on Jan 3rd, 2014, 3:12am

Have you seen this article on min()? It may be your 'unexpected' results are due to 'never' values reporting as the minimum.  The article has a solution for that (i.e. filtering out unset dates). I'd suggest giving that a try before looking deeper for a cause.

Title: Re: note set start/end date based on children's dates
Post by JRL on Jan 3rd, 2014, 7:35pm

Thanks very much.... I'll try to avoid freshman questions but occasionally I just have to 'fess up. I'm excited about putting this software in my workflow.

Title: Re: note set start/end date based on children's dates
Post by Mark Anderson on Jan 4th, 2014, 6:04am

All questions are good - someone lurking or searching later will learn from it. Much of the more interesting parts of aTbRef derive from 'freshman' questions that showed some things were less simple than we'd all assumed. :)

Title: Re: note set start/end date based on children's dates
Post by B.Moreira on Jun 4th, 2016, 4:02pm

And that is true indeed 2 years later I found this useful post that pointed me in the right direction.


Code:
$StartDate = min(collect_if(descendants,($StartDate!="never"),$StartDate))

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.