fnFilter with OR condition for two columns

fnFilter with OR condition for two columns

imacimac Posts: 19Questions: 0Answers: 0
edited February 2013 in General
I am trying to find the rows in which I can find this two columns
Blank | Yes
Yes | Blank

But I dont want to find the cases in which they are:
Yes | Yes
Blank | Blank

Is it possible to do it with fnFilter?
I dont know if using regular expresions might help because the OR condition would only be applied to one only column at each time and that will result in showing the non desirable cases I've mentioned.

This will NOT solve the problem
[code]
oTable.fnFilter("Blank|Yes", 5, true);
oTable.fnFilter("Blank|Yes", 6, true);
[/code]
Regards.

Replies

  • fstelterfstelter Posts: 1Questions: 0Answers: 0
    I've got the same problem. Could anybody help us?
  • imacimac Posts: 19Questions: 0Answers: 0
    I ended up creating another column with 0 or 1, yes or no when the previous columns are as i want.

    Procesing it with PHP with something like:

    [code]
    if (($col3 == 'blank' && $col4 == 'yes') || ($col4 == 'blank' && $col3 == 'yes'){
    $col5 = '1'
    }else{
    $col5 = '0';
    }
    [/code]

    Then making that column invisible width "bVisible": false

    And then filtering by that column.
This discussion has been closed.