Skip to main content
Known Participant
Sep 22, 2023 5:19 PM UTC
Solved

Members from Multiple group

Hi Expert

I want to find members from two groups. can anyone help me how to write expression rule for that?

Thanks 

mikes0011
mikes0011Answer
Brainy
Sep 22, 2023 5:40 PM UTC

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!

The Expression Guru

10 replies

stefanhelzle0001
Brainy
Sep 22, 2023 5:26 PM UTC
mikes0011
Brainy
Sep 22, 2023 5:27 PM UTC

"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"?

The Expression Guru
Known Participant
Sep 22, 2023 5:35 PM UTC

I want All  users who are member of both groups?

mikes0011
mikes0011Answer
Brainy
Sep 22, 2023 5:40 PM UTC

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!

The Expression Guru