Individual column searching with empty rows

Individual column searching with empty rows

sjw01sjw01 Posts: 67Questions: 36Answers: 1

i have implemented this example: https://datatables.net/examples/api/multi_filter_select.html

Problem: I have a column which is empty by default and only gets populated once the row is in a near complete state. (Effectively - if the job has been moved to complete, this field will have "Yes" Otherwise, it Will be empty)

So - i want to exclude those rows with "Yes" - OR filter only empty rows.

Filtering empty rows returns everything - is there a way to filter by exclusion instead of inclusion?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @sjw01 ,

    You could try something like this here, which uses a negative regex search to remove rows with the word 'London' from column 3. This is the important line:

      table.column(2).search('^((?!London).)*$', true, false).draw();
    

    You could do the same and remove 'Yes' from your column.

    Cheers,

    Colin

This discussion has been closed.