<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" width="40px" /> The example database below shows how you can sort sub-tasks by their parent task's due date. This pictured view is simplified for ease-of-use; view the database's All Properties tab to see every property at work.
Created by Thomas Frank | Learn Notion Formulas | Notion Basics | Templates | Twitter
</aside>
// Compressed
if(not empty(prop("Parent Task")), prop("Parent Due Rollup"), if(empty(prop("Sub-Tasks")), prop("Due"), if(not empty(prop("Due")), prop("Due"), dateAdd(now(), 100, "years"))))
// Expanded
if(
not empty(
prop("Parent Task")
),
prop("Parent Due Rollup"),
if(
empty(
prop("Sub-Tasks")
),
prop("Due"),
if(
not empty(
prop("Due")
),
prop("Due"),
dateAdd(
now(),
100,
"years"
)
)
)
)