Answers

We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

To summarise my user story (in reference to columns[1] Positions in test case)

As a user;1. I want to be able to select, from the column dropdown, a value equal to "BPD", "BPO" or "BPOM, and return the filtered results equal to the selected value.

2. Should the row contain multiple Positions, i.e BPD & BPOM, when the users selects BPD from the column dropdown, the datatable should also return the row containing multiple Positions & vice versa, if the user selects BPOM, the datatable should return the row containing both positions.

3. When selecting values from the column dropdown, the user should only see single values. Within attached test case, the column dropdown combines the entire <td> string and adds it to the select dropdown as a unique value.

I think that's about describes what im trying to achieve, ideally if it was possible to write a script which would identify each unique element within the <td> and add it to the column dropdown list that would be great.

if not possible, than the ability to preset the column dropdown values would also work for me.

I made the change for all columns, you may not want that and will still want regex searching for the other columns. You will need to add logic in this loop to apply the correct search type for each column.

For 3 you will need to change how you extract the data from the cell. Instead of simply doing this var val = $('<div/>').html(d).text(); you will need to add some code to extract the text from each span. I would use an array to track which of them have been added so there are duplicates in the list. The hard part would be to have the resulting select options in sorted order.