Can anyone think of an efficient way to evaluate a note’s children and return back to the parent’s $StartDate the youngest date from all the children’s $StartDates and put the oldest $EndDate in the parent’s $EndDate? I presume this will be done by an edict. It will require building a list of the Childrens’ $StartDates, sorting, and picking the youngest, and a list of the childrens’ $EndDates, sorting, and picking the oldest $EndDate. I can build the list, NP. But then what? How would you sort dates in a list? I tried .min and .max, but that did not work. Ideas?
Why collect_if? I’m assuming you don’t want start/end that aren’t set (i.e. "never’). Note that the query $StartDate is the short query form of $StartDate!=“never”, i.e. it has a date value.
Now, to roll it up into one-liners with no interim attribute-stashing of values: