Requirement:
--> The HostInst options depends on the value of OrgUnit.
--> Show only Active (yes) HostInst
The problem:
Filter depends on Plumsail works but I need to filter on two columns:
fd.field('HostInst').filter = `iPathN1 eq 'Faculty of Economics and Business' and Active eq 'yes'`
// I have the following in my plumsail JS:
fd.spRendered(() => {
fd.field('OrgUnit').$on('change', function(value){
fd.field('HostInst').ready(field => {
field.filter = `iPathN1 eq '${value.Title}' and Active eq 'yes'`;
field.refresh();
});
})
fd.field('HostInst').useCustomFilterOnly = true; //it doesnt work with or without this.
});
When I do the following, I get some double values and some are not even shown:
Are you getting any errors in the browser console? Please share a screenshot.
Also, please make sure that the Active field's internal name is valid and that the data in the column is consistent. For instance, filter won't work s you expect if the column value has space like so: ' yes'
Appreciate your suggestions but all your points have been ruled out. Like I explained, the problem is not that the filter isn't working, the problem is that there are duplicate values. PLEASE refer to the images above.
Have you been able to reproduce this? Did you try it in your end? If you want, I can give you permissions to my site to see the problem and maybe find a solution.
Please note that when I use pnpjs, then i get the desired results back. So this is definitely a BUG in Plumsail.
I couldn't reproduce the issue on my form with lookups pointing to a large list. That's why I assume the issue might be with the source list.
Are there duplicate records in the iPathN1 column with different Active column values?
What PnP function are you using? What is the result? Can you filter data in a SharePoint list view manually and see the same result?