Using multiple values in Filtration

Hi,

We are using the below code to filter users that have left the organisation. We would like to remove more users from the Org Chart which are still in the organisation but use a different Department value.

Is it possible to add another Department value to the code? I have tried duplicating the line: return itemData["Department"] != "Off Company"; and changing the value but this did not work.

funciton item data

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

Any help on this would be appreciated, thanks.

1 Like

Hello @aria,

You can use standard JavaScript logical operations for filtration. If you are unfamiliar with them, please see this article.

Here is an example of a filtration rule with two conditions:

return itemData["Department"] != "Off Company" && itemData["Department"] != "Marketing";

It will display only those boxes where the "Department" field is not set to either "Off company" or "Marketing".

1 Like

Thanks Anton, that has worked for me.

1 Like