The filter system

How to combine filters to analyze and act on a dataset

Published on 09/30/2021Hind Andaloussi

Filtering a list allows you to analyze and carry out multiple actions on a predetermined set of data.

The types of filters

There are several types of filters, each of which will contain a number of rules:

  • The texts: is equal, is not equal, understands, does not understand
    It is expected here the entry of a text or the selection among textual options
  • The numbers: is equal, is not equal, less than, greater than, less than or equal to, greater or equal to
    It is expected here the entry of an integer or decimal number
  • The booleans: exists, does not exist
    These are two states of a filter
  • Dates: is equal, is not equal, less than, greater than, less than or equal to, greater than or equal to
    undefined

The operators

The operator And

If two filters are applied and linked by the AND operator, this implies that the criteria of both filters must be satisfied.

We add a filter to the previous one, so we increase the requirement and the number of results may be reduced.

For example: If we filter the list of articles by supplier 'Metro' AND 'Promocash', in the search results will appear the articles which have references from both suppliers.

The operator Or

If two filters are applied and linked by the OR operator, this implies that the criterion of one only, of the other only or of both filters at the same time, can be satisfied.

This is an alternative to the previous filter. The number of results will therefore be greater than with the operator AND.

For example: If we filter the list of articles by supplier 'Metro' OR 'Promocash', in the search results will appear the articles that have references to one, the other, or both suppliers .

Particular case

Be careful not to add filters linked with the AND operator if the rule or the value of the expected criterion is unique.

For example: The owner of a data is unique. If the 'Owner' filter, followed by the 'is equal' rule, has an 'X' value, it cannot be linked with the AND operator to another 'owner' filter with the same rule. Since the value is unique, this combination would not give any result.