Ok, you could do that a few different ways I think. One way would be:
not @delegated and (@today or @due <=[d] today + 24h)
If all of your search logic can be done by testing the attributes of each item separately then combining with boolean operators works well.
On the other hand that search might not do what you want in this case:
- Task 1 @due(2017-08-14)
- Task 2 @due(2017-08-14)
- Task 3 @due(2017-08-14)
- Task 4 @due(2017-08-14)
Here I've intended Task 2-4 under a
@delegated(Person) item. In this setup I mean that all those tasks should be delegated to that person, but the first search that I suggested will still show all tasks. And we can't solve this problem using boolean operators, because they are only useful for testing attributes on items individually... not in hierarchical context.
But this case can be solved like
@today or @due <=[d] today + 24h except @delegated///*
It says ... find all items that are due... and then from those results remove all items that tagged
delegated or descendants of an item tagged
To really understand what's going on please see that user guide link. It should help a lot I think.