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
note set start/end date based on children's dates (Read 3672 times)
JRL
Full Member
*
Offline



Posts: 12

note set start/end date based on children's dates
Jan 02nd, 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....
Back to top
 
 

John L
OSX 10.10.1/ TB 6.1.1
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: note set start/end date based on children's dates
Reply #1 - 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.
Back to top
 
 

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



Posts: 12

Re: note set start/end date based on children's dates
Reply #2 - 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.
Back to top
 
 

John L
OSX 10.10.1/ TB 6.1.1
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: note set start/end date based on children's dates
Reply #3 - 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. Smiley
Back to top
 
« Last Edit: Jan 4th, 2014, 6:04am by Mark Anderson »  

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



Posts: 71

Re: note set start/end date based on children's dates
Reply #4 - 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))  

Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print