Explanation of filter logic - and/or/order of operations

Hi,

I've been reading all the posts I can find that seem to explain how the logic of the filter section works, and I can't get my head around it. I even saw one which explained it before - along the lines of parentheses etc, but I'm afraid to say I still can't make sense of it.

Is there a written explanation somewhere with examples? Also, could anyone explain in maths/logic terms how the 'order of operations' works, where it is applied and how, and how to separate arguments.

This section is so powerful, but I keep trying things and not getting the results I was expecting.

thanks

1 Like

Hi Richard, thanks for using GoodTask.

Using multiple filters are based on math and could be a little tricky. You can check below things to understand how it works.

  • AND operation works as tasks that matches both A and B filters which makes the number of tasks smaller

  • OR operation works for tasks that matches either A or B filters which is a broader term

  • Order of operation works as if other filters doesn't exist. So if you have many filters, the one with the 'Order' set and the previous one will run first. After that, those 2 filters will work as 1 and then the next order will run.

Hope it helped. Thanks!

Hi, thank you for the reply. I'm good on the AND and OR. The order of operation is particularly confusing. Are you able to give a couple of worked examples?

I've seen it described as like parentheses (which I understand), but it doesn't look anything like parentheses, hence the confusion

thank you :slight_smile:

You can think like this. All filters will run by itself. After that, results will get merged. Merging will start with the one that has order of operation 1. The selected operation will run between the one that has it set and the one before. After that, those two will be seen as one. Next merge will be run between the one with order of operation 2 and the one before that.

Thanks!

1 Like

thank you. So if for example I wanted to have a set of filters that shows:

  • tasks scheduled today
  • tasks tagged with "next" that are undated
  • none of the above, if they are tagged with "later"

would I do:

  • today scheduled
  • tagged next (OR 1)
  • undated (AND 2)
  • exclude tagged "later" (OR 3)

?

Hi Richard, I think it should be like below.

  • Today scheduled
  • Tagged Next (OR 2)
  • Undated (AND 1)
  • Exclude tagged later (AND 3)

This will merge Tagged next and undated first to make your 2nd needs which are tasks tagged with next that are undated.

After that, result of that and today scheduled will be merged together with OR 2.

Finally it will remove ones with later tag by handling it with AND operation which holds all the tasks without later tag.

Thanks!

thank you. i think i understand that.

I think the key will be to try and keep it simple, and then if I can't get more complicated things to work, to get back in touch!

thanks for your help, Richard

1 Like

I don’t understand your explanation.

Why does one of the terms not have a sequence number associated with it? That would imply to me that it is the first filter to be processed, but you talk about it as though it is the third one to be applied. How does it know to apply it not first, not last, but in the middle there when there isn’t a sequence number, so associated with it?

Hi @thatadamguy, thanks for the feedback.

You set the order of operation on the one at the end as it sets up the operation. For example, if you have 2 filters, you set operation between them on the 2nd one. And if you have 3 filters, you set 2 operations and as you set the order, the one previous to the operation will run with the one with the operation from 1 and on.

So if you have multiple filters, operation with the order number 1 will run with its previous filter and will become a filter as a result. Next ones will run in order.

Thanks!

That makes a lot of sense now, thank you!!

It seems confusing for GoodTask to not rearrange the operations into the actual order you speicfy by number, forcing yout to hunt up and down, back and forth all over the place try and make sense of wet spaghetti. Is there a reason for that being the way it is that I also might just not initially be seeing the logic (no pun intended) of?

Actually I don’t think there is much difference in re-arranging it automatically in order or keeping it as is with order adjustment available. (Both are somewhat complicated)

Keeping the order as it’s added and making the order number editable was a better choice for flexibility and was less confusing.

Thanks!