group.ContainsDept
Overview¶
Determine whether the "group object" in the "Server Script" contains the specified "Depts".
Syntax¶
Return Value¶
If the specified "Depts" is included, it returns true; if not, it returns false.
Usage Examples¶
The following example checks whether the "Group" with group ID 1 contains the "Dept" of the logged-in user.
JavaScript¶
let group = groups.Get(1);
if (group.ContainsDept(context.DeptId)) {
context.Log('contains');
} else {
context.Log('not contains');
}