When all subitems are done mark task as done

Hello! I need to create a formula that will automatically mark a task as done once all the subitems have been marked as done

Go to the automations center and search “when all” and it’ll come up as the second choice