Multiple Filtration Functions possible?

I am using 2.0 and would like to know if it is possible to filter on more than one item?

For example, the standard filter based on my rootID works fine like this providing the rootID is in the same department:

return itemData[‘Department’] == “Accounting & Finance”

But my rootID has more than 1 department reporting to her and she is in the “Executive Team” dept so the above wont work. I only want one of the departments to show for her so I’ve made it look like this to try and not show the ones i don’t want to see:

return itemData[‘Department’] != ‘Human Resources’ ||
return itemData[‘Department’] != ‘Travel’ ||
return itemData[‘Department’] != ‘IT Department’ ||

The problem is it won’t read beyond the first line. It excludes Human Resources from the list but still shows the rest. I’ve tried replacing || with or with same results.

Is this even possible? Will it only do the first function it sees or how can I add multiple conditions?


Hi Joe,

Thank you for your question.

Your filtration function has to be with single return statement. You can use && and || operators to create complex conditions.

Did you try something like the code below?

return itemData['Department'] != 'Human Resources' && itemData['Department'] != 'Travel' &&  itemData['Department'] != 'IT Department' ||

With such filtration rule Org Chart will display users from all departments except Human Resources, Trabel and IT.