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

var isManagerFilled = itemData["Manager"];

return isManagerFilled;

return (itemData["Assistant"] != ("First Last"));


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

return (itemData["UserName"] != ("[email protected]")) &
(itemData["UserName"] != ("[email protected]")) &
(itemData["UserName"] != ("[email protected]"))&
(itemData["UserName"] != ("[email protected]"));

My local developer was able to help me with this code that accomplishes both:

// this is an array of the usernames we need to ignore
var ignoreList = [
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
// 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. =)