Searching for sub-string from Cell value

Searching for sub-string from Cell value

ak11ak11 Posts: 14Questions: 6Answers: 0
edited January 2020 in Free community support

Hello,

Using DataTables and set up columns like:

columns: [
                   ...
                    { data: "Location" }
                ],

Location data in a cell could be - "Los Angeles, New York, San Francisco"

In my javascript, I use

DataTable().getSelectedRow().data().Location.search("New York")

It works if search term is the first term but does not work in above scenario where New York is the second city listed.

When I assign the value of DataTable().getSelectedRow().data().Location to a variable, I see the complete string. So the search function seems to be an issue.

What can the solution be?

Thanks,

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.