Skip to main content
October 4, 2022
Solved

How to separate out Users and Group which are part of one Main Group in ER

  • October 4, 2022
  • 4 replies
  • 0 views

Hi @all,

Is there an easy way to separate out users and groups from a Main Group in an expression rule. 

Below are the users and groups coming from a group itself. I want to separate out users from this list and wants to store it.

Looking forward for your support, Thank you in advance!

    Best answer by csteward

    Yes, a!groupMembers() can return only the list of direct, user type members in a group such as:

    a!groupMembers(
      group: cons!YOUR_GROUP_CONSTANT,
      direct: true,
      memberType: "USER"
    )

    4 replies

    harshitb6843
    October 4, 2022

    I think you can convert them into a string and then use the isusernametaken() function. If it returns true, then it is a user else it is a group. 

    maryl0003Author
    October 4, 2022

    Thanks @Harshit

    csteward
    cstewardAnswer
    October 4, 2022

    Yes, a!groupMembers() can return only the list of direct, user type members in a group such as:

    a!groupMembers(
      group: cons!YOUR_GROUP_CONSTANT,
      direct: true,
      memberType: "USER"
    )

    maryl0003Author
    October 4, 2022

    Thank you @Chris