Multiple Filteration

by David12345 » Tue Aug 30, 2016 1:37 pm

Hi,

Just wanted to ask how can i get the following functonality:

I don't want to show the users with empty hire date and also the users who don't have deprtment classification.

I have tried the following code but it behaves as simple JS - if the user has hire date but no deprtment it shows him and he isn't supposed to be shown.

Code: Select all
return itemData["SPS-HireDate"] != "" || itemData["Department"] != "";


Do you have any idea?

Thanks,

David.
David12345
 
Posts: 1
Joined: Tue Aug 30, 2016 1:27 pm

by Evgeniy Kovalev » Tue Aug 30, 2016 2:13 pm

Hi David,
Thank you for the message.

If the user has hire date but no department, then your expression returns: true || false = true. And this user will be shown.

Try to use this expression:
Code: Select all
return itemData["SPS-HireDate"] != "" && itemData["Department"] != "";

The result of this expression: true && false = false. And it will be true if hire date and department is not empty at the same time.

Best regards
Evgeniy Kovalev
Plumsail Team
User avatar
Evgeniy Kovalev
 
Posts: 55
Joined: Wed Jul 20, 2016 2:13 pm


Return to Org Chart for Office 365