Let’s say you’ve got the following checklist:

* TODO Nightly DEADLINE: <2017-12-22 Fri 22:00 +1d> :PROPERTIES: :ID: 12345 :BLOCKER: match("nightly") :TRIGGER: match("nightly") todo!( TODO ) :END: * TODO Prepare Tomorrow's Lunch :nightly: * TODO Lock Back Door :nightly: * TODO Feed Dog :nightly:

You don’t know in what order you want to perform each task, nor should it matter. However, you also want the parent heading, “Nightly”, to be marked as DONE when you’re finished with the last task.

There are two solutions to this: 1. Have each task attempt to mark “Nightly” as DONE, which will spam blocking messages after each task.

The second is to use conditional forms. Conditional forms are simple; it’s just if/then/else/endif:

if CONDITION then THEN else ELSE endif

Here’s how that reads:

“If CONDITION would not block, execute THEN. Otherwise, execute ELSE.”

For our nightly entries, this looks as follows:

* TODO Prepare Tomorrow's Lunch :nightly: :PROPERTIES: :TRIGGER: if match("nightly") then ids(12345) todo!( DONE ) endif :END:

Thus, we replicate our original blocking condition on all of them, so it won’t trigger the original until the last one is marked DONE.

Occasionally, you may find that you’d rather execute a form if the condition would block. There are two options.

The first is to use consider(all) . This will tell Edna to block only if all of the targets meets the condition, and thus not block if at least one of them does not meet the condition. This is the opposite of Edna’s standard operation, which only allows passage if all targets meet the condition.

* TODO Prepare Tomorrow's Lunch :nightly: :PROPERTIES: :TRIGGER: if consider(all) match("nightly") then ids(12345) todo!( DONE ) endif :END:

The second is to switch the then and else clauses:

* TODO Prepare Tomorrow's Lunch :nightly: :PROPERTIES: :TRIGGER: if match("nightly") then else ids(12345) todo!( DONE ) endif :END:

The conditional block tells it to evaluate that section. Thus, you can conditionally add targets, or conditionally check conditions.

Another common use case is to check for a property:

* TODO My Task :PROPERTIES: :TRIGGER: if self has-property?("REPEAT" "2") then self set-property!("REPEAT" inc) todo!(" TODO ") endif :REPEAT: 0 :END:

When “My Task” is set to DONE, REPEAT will be incremented, then the task will be set back to TODO. This happens until REPEAT is 2. Once that happens, the task will be left alone, staying in the DONE state.

Be warned that trying the above example with a repeater will not work. In order for that to work, Edna must take over the repeater:

* TODO My Task SCHEDULED: <2020-09-02 Wed> :PROPERTIES: :TRIGGER: if self has-property?("REPEAT" "2") then self set-property!("REPEAT" inc) scheduled!("+1d") todo!(" TODO ") endif :REPEAT: 0 :END:

This example will increment the SCHEDULED time by one day every time the task is marked DONE.