0

I'm unable to implement the filter functionality for a people picker field in data table. Is there any way to implement this filter against a people picker field in data table?? Below is the code which I'm trying to implement filter.

<td>
<span id="CentralECG2">
<div dir="">
<div id="CentralECG2_TopSpan" title="Enter a name or emailId" spclientpeoplepicker="true"></div>   
</div>
</span>
</td>
if(peopleFilter != "") {
        var requestUrl = absoluteUrl + "/_api/web/siteusers?$filter=Email eq '"+ peopleFilter +"'"; 
        var userData = getDatafromList(requestUrl)[0];  
        peopleFilter = formatname(userData.Title);
 
        if(TableFilter == true) {
            $('#filterBy').text(peopleFilter);
            table.column(20).search(peopleFilter, false, true).draw(); //this search is not working since the field is people picker, but when I change to free text it's working.
            
        }
        
    }
Allison Paiva
  • 37
  • 1
  • 5
  • Can you [edit] your question to show us the relevant (minimal) code & data which illustrates your problem? See [mre]. – andrewJames Mar 24 '21 at 13:51
  • Thank you for the updates. I think you may need to clarify what technologies you are using, here. One of the question's tags is `datatables` which means [this](https://datatables.net/). But I do not see anything in your question which relates to DataTables. If that tag is not relevant, you should probably remove it. (I am not familiar with peoplepicker.). – andrewJames Mar 24 '21 at 15:27

0 Answers0