Hello, is there a way how to filter Person column. I like to filter persons that are in specific sharepoint group but i need to be dynamic based on ContentType.
Dear @Patrik,
You can filter a Person field by the display value the same way as a text field:
Hello @IliaLazarevskii I meant column named AssignedTo (Person/Group column type) can i filter it somehow?
Hi @Patrik,
Yes, you can filter a Group/Person column in the same way as a text column. Use something like this:
fd.spRendered(function() {
var dt = fd.control('ListOrLibrary1');
dt.ready(function() {
filterLoL();
});
//filter List or Library with new value when Search field changes
fd.field('Search').$on('change', function() {
filterLoL();
});
function filterLoL(){
dt.filter = "<Contains><FieldRef Name='AssignedTo'/><Value Type='Person'>"
+ fd.field('Search').value + "</Value></Contains>";
dt.refresh();
}
});