Conceptional Wonderful Relations Filters are “where” conditions for an underlying query of a datatable.
Filters are prepared before query execution, so only the selected data will be transfered to the client. See section serverside processing. Think about having an index on the column which is filtered.
- Filtered Field
- Sort Order
Filtered Fields must not be displayed, but must be a present field in the query. This fields could be calculated. Filtered fields are the conceptional where condition, where date range filters use between, dropdown equals and multidropdown the in codition.
The selected query provides the displayed filter options, also the selected data or displayed start and end date.
DateRange Queries needs field start_date and end_date
DropDown needs value and text and optional selected column
SELECT DATE_ADD(DATE_ADD(LAST_DAY(now()), INTERVAL 1 DAY), INTERVAL - 1 MONTH) as start_date , LAST_DAY(DATE_ADD(NOW(), INTERVAL 24-MONTH(NOW()) MONTH)) as end_date FROM DUAL
SELECT 1 value, 'Option 1' text, 1 selected union select 0 value, 'Option 2' text, null selected FROM DUAL
If the query do not provide any default value, you can set a default value here.
Filters are Displayed above the DataTable, this sortorder defines the order of the filters.
Value Caching Entity:
If a cell is present as a commasparated multivalues like (1,2,3,4) a filter use “in”. If multidropdown is selected a filter uses “or”. So if we have multidropdown (1,2) we get a multivalue (1,3) and (2,4) but not (3,4).