Filter Org Chart using Custom Boolean Field

I am trying to filter the org chart (user profile) with custom Boolean field. My code as below.
Its not working, appreciate help.


return itemData "FieldValue" = true;

return true;

Hello! You need to set the filtration rule according to the documentation and common JavaScript syntax.

The reference to the data source should look like: itemData "FieldValue" > itemData["FieldValue"]. Note, that the "FieldValue" is the column name in the data source. You can find the available columns here:

For comparing, the double equals sign is used: = > ==.

In the function, only the first return will work. All the code under it will be ignored. Thus, the filtration function should look like:

  return itemData["FieldValue"] == true;

Hi, Thanks for reply. I have updated as below, still filtering is not working.

Oh, I am sorry, I mad a typo:

  return itemData["FieldValue"] == true;

I have updated my post above to avoid further confusions.

Hi, Its not working in both cases, i have attached screenshot for your reference.

Please share the screenshots of the rendered chart and of the data source items/profiles that should be shown and filtered out. The value in the "RSPCorpFunction" field should be visible. Clarify why you think that it does not work.

I'm running into a similar issue.

I'm trying to hide any employees with a value of True in the SPS-HideFromAddressLists field. It doesn't seem to matter if I use True/true/False/false.

return itemData["SPS-HideFromAddressLists"] == False;

I added the field so that it displayed the data as I've shown here. Any ideas?


Hello @Steve.Hanzelman,

Could you please provide a screenshot of the 'Filtration' tab in your Org Chart?

For your reference, you can also use a shorter form of the conditions in your code. Use the following code for all true values:

return itemData["SPS-HideFromAddressLists"];

And the following code for all false values:

return !itemData["SPS-HideFromAddressLists"];

Hello Anton,
It worked if used this statement:

return itemData["SPS-HideFromAddressLists"].contains("False");


1 Like