Custom Filtering
Custom Filtering
Im using yadcf 1.10 and im trying to do the following:
i have a multi_select filter above some Columns and i want that only those rows are shown, which DONT contain the selected values.
Example:
| col1 |
| apple |
| beer |
| plant |
| tree |
| meat |
| fish |
| tree/beer |
| meat/apple |
==> i select apple AND beer:
| col1 |
| plant |
| tree |
| meat |
| fish |
| tree/beer |
| meat/apple |
==> cleared search and now selecting tree AND beer AND meat AND fish:
| col1 |
| apple |
| plant |
| meat/apple |
How can i do this server-side?
Answers
Something like the following: iterate over your rows and for each value iterate over selected values and if they differ then add this row to returned json string
it has to be done serverside because of 800.000 rows. Isnt there a simplier solution just like putting a NOT in front of the normal filter rule, i just want the opposite
Or something like an OR statement would be cool...
when i select 2 Items in a column its shown as empty, because there is no row with both values, but i want to show the rows that have A OR B.
As it needs to be done serverside what is the usual expression to exclude rows with a special value in a selected column?
SELECT * FROM table WHERE valueInColumnA != "givenValue" AND valueInColumnA != "givenValue2" .. etc.
Amy Ideal?
do you mean something like this? http://tradexat.com/fairtrade use the Min/Max field
Well its pure text in the fields no Numbers.
Much simplier:
I dont want to Filter 1 thing, instead i want to get all values different Than the selected ones.
I do a Test with NOT IN it Sounds Like that what i need
Well i dont have a clue on how to enable the Filter from yadcf with NOT IN and the values from the dropdown