====== Criteria ======
In the designer, you can specify criteria on the data :
* in the general case, at the [[:en:v8_0_0:designer:menus:accueil:nouvellerequete:consultation#filtering|query filtering level]] #TBC
* in rarer cases, at the [[:en:v8_0_0:designer:menus:accueil:nouvellerequete:jointures#joints_conditions|joints level]]. #TBC
*
In both cases, the entry and the combination are very close.
====== Disable a Criteria ======
Each criteria is preceded by
Chaque ligne de critère est précédée d'une case à cocher. Si la case n'est pas cochée, le critère n'est pas pris en compte.
In the development phase, it is a good idea to add a temporary restrictive criterion on the data, so that test runs are fast. Before publication, one can simply uncheck the criterion and leave it available for future tests.
===== Add a criterion =====
{{:en:v8_0_0:designer:menus:accueil:nouvellerequete:pasted:20200710-094937.png?nolink&480}}
{{:en:v8_0_0:designer:menus:accueil:nouvellerequete:pasted:20200710-095019.png?nolink}}
A wizard allows you to choose the term on the left from the tables, subqueries or operations. Operations can accept [[:en:v8_0_0:designer:menus:accueil:nouvellerequete:parametres|parameters]], use fields from tables or subqueries, or use other operations.
{{:en:v8_0_0:designer:menus:accueil:nouvellerequete:pasted:20200710-095223.png?nolink&480}}
The term on the right can, in addition to table fields, subqueries or operations, be hard coded.
{{:en:v8_0_0:designer:menus:accueil:nouvellerequete:pasted:20200710-095447.png?nolink}}
===== Combining criteria =====
When there are several conditions and there are logical "ORs" between these conditions, use the ''A/O'' tools (A/0 standing for And/OR) to toggle the flag, the Up/Down arrows to move the lines relative to each other, and the parenthesis tools.
{{:en:v8_0_0:designer:menus:accueil:nouvellerequete:pasted:20200710-095848.png?nolink}}
If you want to create a criterion on multiple values (Company code = 00001 or 00003 or 00004, for example), it is much better to use a list of values rather than accumulating rows of criteria.
{{:en:v8_0_0:designer:menus:accueil:nouvellerequete:pasted:20200710-100035.png?nolink&500}}\\
{{:en:v8_0_0:designer:menus:accueil:nouvellerequete:pasted:20200710-100119.png?nolink&500}}\\
{{:en:v8_0_0:designer:menus:accueil:nouvellerequete:pasted:20200710-100223.png?nolink&500}}\\
===== Match / Not Match =====
* If the radio button is set on ''Match'', only lines matching all criteria are displayed.
* If the radio button is set on ''Not match'', only line not matching at least one criterion are displayed. It is [[https://en.wikipedia.org/wiki/Negation|negation]] from a logical perspective.
Sometimes it is easier to describe records you don't want than those you want. In this situation you may use "Not match" option.