This clause returns true if all of a message’s internal recipients are in the same Department as the message’s sender. Since empty sets are considered equal, this clause selects messages for which both
Sender.Person.Department and
InternalRecipients.Person.Department are null. Since a link path is null when any field in the path is null,
Sender.Person.Department is null if any of
Sender,
Sender.Person, or
Sender.Person.Department is null. To return true only for non-null sets, add a second clause that selects non-null values for one of the link paths. Example:
CONTAINS performs an overlap comparison, testing whether the first parameter produces a value set that
contains the values produced by the second parameter. This clause above selects a message if at least one internal recipient whose
Office contains the term
aliso is in the same department as the message’s sender. As in the previous example, another clause can be added to skip messages where both link paths are null.