Filtering Disabled Users


We have been trying to figure out the correct syntax, which will enable us to filter out disabled user accounts. We need to keep this accounts active in Active Directory, but do not want them displaying in the Org Chart. We have decided to “blank out” the Title field in the applicable User AD Properties and use this as the field we want the filter to act against. We have used the following syntax without success:

[color=#FF0000]return itemData[“Title”] != “”;
return true;


return itemData[“Title”] != null;
return true;

Any assistance would be great.



Thank you for your question.

We use JavaScript based syntax for filtration function. So, you can use such filtration function:

function(itemData){ return itemDate["SPS-JobTitle"] || itemDate["Title"]; }

Such expression ensures that at least one of specified properties is not empty.

I checked two properties “SPS-JobTitle” and “Title” because they both can store information about job title in user profile.

Best regards
Anton Khritonenkov


You had a typo in the example you provided, but after correcting, it worked as designed. Thanks for the help.

return [color=#FF0000]itemDate[/color][“SPS-JobTitle”] || [color=#FF0000]itemDate[/color][“Title”];

should be:

return [color=#008000]itemData[/color][“SPS-JobTitle”] ||[color=#008000] itemData[/color][“Title”];



Thank you for correction.

Best regards
Anton Khritonenkov
Plumsail Team


Is there a way that you can filter out disable users by their account status being disabled?


Hi Turtlgal,

You have two options to hide disabled users from the chart:

  1. You may set a user to have no manager, here you will find how to do it.

  2. You may also hide such employees by creating a department called, fox example “Off company”, putting disabled employees in this department and filtering the department out of the chart like this:

   return itemData["Department"] != "Off company";


I have users with no managers that show up when I do a search. Any ideas?


The users don’t show in the Org Chart itself, but they do show in searches. Is there anyway I can filter them out of the search, maybe something that filters on Manager is not Null/Empty?


Hi @turtlgal,

If you applied filtration function on Filtration step of the configuration wizard, it works for whole Org Chart including search results.

If you still see those employees, there are two possible reasons:


Im not sure what to put in to the Filtration step to make it where Manager is not empty.


Can anyone help me with what filtration I would use for Manager is not empty? @Anna @antonkhrit


Hi @turtlgal,

You can hide users without managers from search. But if they have subordinates, they will be still searchable. So, it is difficult to hide subtrees from search. But if you are ok with just hiding employees without manager, here is instruction:

  1. Set Root ID to make sure your root employee (probably CEO) is not omitted.
  2. Add this part to filtration function:

If you have some other exression in filtraion function, you should add isManagerFilled to your existing expression.


  var isManagerFilled = itemData["Manager"];

  return isManagerFilled;


So I can apply the root id, but when I apply the filtration after that it no longer can see the root ID.
Is there a way to add an except or else statement?


What version of Org Chart do you use? You can see in on the last page of the config wizard. The latest Office 365 version always displays person with root.

Anyway you always can add exclusion of root employee to your condition like this:


  var isManagerFilled = itemData["Manager"];

  return isManagerFilled || itemData["AccountName"].contains("ROOT_ACCOUNT_NAME");

Replace ROOT_ACCOUNT_NAME with account name of your root employee.


That worked! thank you. and Im using 3.1.3


Hi Anna,
Where is this javascript file so, I can add these javascript functions.



Hi, indirimkodu

You need to add this script on the “Filtration” step of the configuration wizard.