Hey Gal, thanks for reaching out! I think everything you’re looking to do can be accomplished with a Filter() formula. Here’s our help article on this for reference: Using the Filter formula | Coda Help Center.
If you want to count upstream tasks, you’ll need to think of a filter argument that outputs the upstream rows so you can tally together the tasks.
The same goes for removing tasks after it’s marked done. That filter argument would look like this: [Done T/F].Not().
You can use AND or OR to string the filter arguments togethers.
Thank you Renita.
I Love the filter formula and using it all the time!
However, I still can’t seem to find a way to filter the table and also go more than 2 levels deep.
For now, I used ListCombine and CountUnique but that doesn’t resolve it completely and I can’t get rid of the completed tasks.
I have not really attempted it myself but I would assume that to handle exploring the dependency chain arbitrarily deep (upstream from a dependency), then you would need some sort of graph traversal algorithm. This would need to find an upstream dependent, count it, and then explore its upstream dependents and so on. You would need some sort of data structure to track which upstreams remain to be explored. It would be some list of the upstreams, which is both iterated on by the .ForEach() (until empty) and within the loop body you would be adding the upstream dependents as they are discovered to that list. I have not experimented with this and not sure if possible.