I am trying to filter out any user that doesn't have a manager and any user that has a specific assistant. I can't seem to make it work.
Any assistance would be greatly appreciated
Here is what I am trying
function(itemData){
I have also tried filtering out specific individuals(instead of by assistant) but I can't figure out how to combine the two elements... How to I filter out as below but also filter out users with no manager
SOLVED
My local developer was able to help me with this code that accomplishes both:
function(itemData){
// this is an array of the usernames we need to ignore
var ignoreList = [
'user.one@contoso.com',
'user.two@contoso.com',
'user.three@contoso.com',
'user.four@contoso.com',
];
// this will have a value of true if it has manager data
var hasManager = (itemData["Manager"] !== '') ? true : false;
// this returns true if the given userName is not in the ignoreList array
// and the given user has manager data
return (ignoreList.indexOf(itemData['UserName']) < 0 && hasManager) ? true : false;
}