Custom Filtering

Custom Filtering

MaxxxelMaxxxel Posts: 14Questions: 3Answers: 1
edited February 2017 in Free community support

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

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67

    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

  • MaxxxelMaxxxel Posts: 14Questions: 3Answers: 1
    edited February 2017

    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 :D

    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.

  • MaxxxelMaxxxel Posts: 14Questions: 3Answers: 1

    Amy Ideal?

  • PaulFreeWebsPaulFreeWebs Posts: 63Questions: 4Answers: 1

    do you mean something like this? http://tradexat.com/fairtrade use the Min/Max field

  • MaxxxelMaxxxel Posts: 14Questions: 3Answers: 1

    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.

  • MaxxxelMaxxxel Posts: 14Questions: 3Answers: 1

    I do a Test with NOT IN it Sounds Like that what i need

  • MaxxxelMaxxxel Posts: 14Questions: 3Answers: 1

    Well i dont have a clue on how to enable the Filter from yadcf with NOT IN and the values from the dropdown :/

This discussion has been closed.