Column Search API - Single Column, Multiple Queries

Column Search API - Single Column, Multiple Queries

24VQYY24VQYY Posts: 2Questions: 1Answers: 0

I'm trying to use the column search API, and am able to do so successfully when searching for a single query, however I am trying to get it so that it returns columns that return EITHER value A or value B.

For example, a table is as follows:

ID Group Name
1 Animals Dog
2 Animals Cat
3 Plants Daffodil
4 Plants Sunflower
5 Objects Rock

And I want to select any row that is part of either the group "Animals" or "Plants".

I have tried using the regex pattern, as follows:

dataTable.column(3).search("Animals|Plants", true).draw();

However this only returns plant rows.

Any help would be appreciated!

Thanks.

Answers

Sign In or Register to comment.