After reading this article you will know:
What grouping in filters means
How to build logic into filters
HowTo apply grouping in filters
You can create complex filters by grouping certain conditions together in an
Each row you add to a filter contains a condition which is used to filter data. Multiple rows can be joined together with an
AND so that condition A
AND B must be true for a record to turn up. But you can also use an
OR so that A
OR B has to be true for a record to turn up. You can group rows together to make this more complex.
Let’s start with creating a grid filter.
After creating the new filter, add a condition to your first condition row.
To use grouped rows, we will need multiple condition rows. You can add a new condition row by clicking on the Add condition row button.
A new condition row will appear where you can create another condition that you data has to meet.
Between the 2 condition rows there is an
ORsection; this section is called a conjunction. In the conjunction, you can declare if you want both conditions to be true with
AND, or that either one of the conditions has to be true with
OR. Let’s choose
Now we have a filter that uses 2 condition rows, but what if we need a filter with even more condition rows? That is possible, but there is a catch. The conjunctions need to be the same within a group, and this is where grouping comes into play. Let’s continue with the filter that we have just created.
Create a new condition row and set the condition. The new conjunction of the condition rows will be set to
AND. When trying to change this to
ORthe other conjunction will also change to
OR. We can fix this by grouping our condition rows.
Select the 2 bottom condition rows. You can do this by clicking on the checkbox on the left side of the condition row.
Click on the Group rows button to group the 2 condition rows together.
With the new condition group we can change the conjunction of our group to
ORwithout having to worry about the other conjunction changing too!
We have created a simple grouped filter with multiple condition rows. You can make these filters as complex as you want them to be. If you want to know more about grid filters you can check out this article explaining each setting of the filters: Filter Reference.
We have conditions rows A, B and C with the following cases:
All must be true so: A
At least one must be true: A
A must be true, or B and C must both be true: A
A or B must both be true, or C and D must both be true, and E or F must both be true: (A
OR F) )
If you want to read more about filters you can check out: HowTo filter data in a grid?