➡️ Objective : A button that sets parent task to “Done” if only of its sub tasks are all done (or it has no sub tasks at all).
<aside>
Task Database 1 - One-Time Tasks Only
</aside>
/*Formula for the "Set to Done" button */
/*Checks status of the sub tasks and if they are all done, sets parent task to "Completed"*/
/*If there are no sub tasks, it also sets the task to "Completed"*/
ifs(
or(
context("This page").prop("Sub-item").empty(),
every(context("This page").prop("Sub-item"),current.prop("Status")=="Done")
),
"Done",
context("This page").prop("Status")
)
/*Formula for the "Set to Done" button */
/*Checks the Rollup property, if it equals to 1 (meaning 100% completion of sub tasks), sets parent task to "Completed"*/
/*If there are no sub tasks, it also sets the task to "Completed"*/
ifs(
or(
context("This page").prop("Sub-item").empty(),
context("This page").prop("Completion Rollup")==1
),
"Done",
context("This page").prop("Status")
)
<aside>
Task Database 2 - With Recurrence Functionality
</aside>
<aside> <img src="/icons/info-alternate_yellow.svg" alt="/icons/info-alternate_yellow.svg" width="40px" />
This example is intended for personal/educational use only and may not be copied, shared, or distributed, in whole or in part, for any commercial purposes. All rights reserved by Planswer Lab.
</aside>