fnFilter with OR condition for two columns
fnFilter with OR condition for two columns
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.
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.
This discussion has been closed.
Replies
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.