Hi Expert
I want to find members from two groups. can anyone help me how to write expression rule for that?
Thanks
Discussion posts and replies are publicly visible
"members from two groups" could mean a few things that are mutually exclusive. Can you clarify? For instance, do you want "all users who are members of at least one of these two groups"? Or alternatively "all users who are members of both groups"?
I want All users who are member of both groups?
Functions Documentation is highly useful. Keep it open in a browser tab if you can.
For instance we have the function a!groupMembers(), which you feed a group and you can get all users that belong to the group.
Then we have the intersection() function which returns the values that are common between two arrays.
Put those together and you suddenly have an array of all users that belong to both groups!
Or have all in one using getdistinctusers()
That appears to return all users who are a member of any of the included groups, which is not what OP is after.
Hm ... true, maybe. We will see.
Well, I tried it out before challenging you on it ;-)
I meant that, indeed, there is a strong indication the OP is looking for the intersection. But I still see the option for a different requirement. And I hope he relieves us from this uncertainty.
Oh, then yes I agree.