How to filter users with no manager and a particular assistant

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){

var isManagerFilled = itemData["Manager"];

return isManagerFilled;

||
function(itemData){
return (itemData["Assistant"] != ("First Last"));
}

@antonkhrit
@Anna
@Petr

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

function(itemData){
return (itemData["UserName"] != ("user.one@contoso.com")) &
(itemData["UserName"] != ("user.two@contoso.com")) &
(itemData["UserName"] != ("user.three@contoso.com"))&
(itemData["UserName"] != ("user.four@contoso.com"));
}

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;
}

1 Like

Hello, Rachel! Thank you for sharing the solution you have found out. We very appreciate it. =)