Skip to main content
January 11, 2023
Question

How to get only groups assigned to user?

  • January 11, 2023
  • 5 replies
  • 0 views

Hi Everyone,

I am using the script a!groupsForUser(loggedInUser()) to get list of groups assigned to user but it gives the id along with group and I only want group name.

Can anyone please suggest?

    5 replies

    konduruc733182
    January 11, 2023

    Hello shubhamy0005,

    Please try this code, it works!

    a!forEach(
      items: a!groupsForUser(loggedInUser()),
      expression: group(fv!item,"groupName")
    )

    January 11, 2023

    Thanks Konduru, This expression gives insuffiicient permission error.

    January 11, 2023

    Hi [mention:9e801b4ea7ba47db8735359b555491e6:e9ed411860ed4f2ba0265705b8793d05], Can you please share the error you are receiving.

    vinays024987
    January 11, 2023

    You can try this.

    getgroupnames(
      a!groupsForUser(loggedInUser())
    )