Multi value fields filtering
Multi value fields filtering

Hello,
I have columns with multi value fields for example : "A,B,C" and also fields with multi value fields and html (<br>) for example "A, B <BR> C" (I used the column render to produce this output)
I want to use some kind of column filtering: https://datatables.net/examples/api/multi_filter_select.html
OR SearchPanes extension .
The problem is that they take the entire field value, so the select option for the example above will be only "A,B,C" instead of 3 options for each of the letters: "A" "B" "C" .
I don't know how to approach this problem, and I would appreciate any directions to solve this.
Thank you very much!
This question has an accepted answers - jump to answer
Answers
Hi @Macaroni91 ,
Maybe take a look at this example. It shows searchpanes using arrays to filter data. Are you able to use that?
Thanks,
Sandy
Thank you @sandy !
I am able to use this if the data for a certain column contains only an array.
However, when there are several objects (that I separate with <br>) and each object has an array, it doesn't work.
The data looks like this :
If I'm trying to filter for a specific "pmid" for example I tried the following code that doesn't filter well :
data: "variant[]",
render: {
_: "[<br> ].pmids",
sp: "[].pmids",
},
However filtering for "dvd_link" works well :
data: "variant",
render: {
_: "[<br> ].dvd_link",
sp: "[].dvd_link",
},
searchPanes: {
orthogonal: "sp",
},
Thank you @sandy !
I am able to use this if the data for a certain column contains only an array.
However, when there are several objects (that I separate with <br>) and each object has an array(that i separate with commas) it doesn't work.
The data looks like this :
If I'm trying to filter for a specific "pmid" for example I tried the following code that doesn't filter well :
However filtering for "dvd_link" works well :
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.
Cheers,
Colin
I solved the problem, I needed to call orthogonal: "sp", instead of using orthogonal: "[].pmids" .
It works well, thank you!