The result we want in plain english โ
if tag equals Work :: Checked
if due within 2 weeks :: Checked
if hours allotted greater than 2 hours :: Checked
Otherwise :: Unchecked
The result in a nested IF Statement โ
if(if(if(prop("Tags") == "Work", true, false), dateBetween(prop("Due"), prop("Today"), "days") <= 14, true), prop("Hours Allotted") > 2, true)
Break Down โ
Essentially, we're going to work from the middle out:
if tag equals Work :: Checked โ
if(prop("Tags") == "Work", true, false)
if due within 2 weeks :: Checked โ
if(if(prop("Tags") == "Work", true, false), dateBetween(prop("Due"), prop("Today"), "days") <= 14, true)
if hours allotted greater than 2 hours :: Checked โ
if(if(if(prop("Tags") == "Work", true, false), dateBetween(prop("Due"), prop("Today"), "days") <= 14, true), prop("Hours Allotted") > 2, true)
Syntax Reference โ
FALSE:
if(true, false, true)
FALSE:
if(if(true, false, true), true, false)
TRUE:
if(if(if(true, false, true), true, false), false, true)
TRUE:
if(if(if(if(true, false, true), true, false), false, true), true, false)