Hi,
I Need to get the Root Group Name of a Group.
How can i achieve this.
Hi,
I Need to get the Root Group Name of a Group.
How can i achieve this.
Satish,
Would you mind providing a little more detail on your request?
If you are asking how to get the parent information for a group you may use the Groups REST API referenced on https://community.telligent.com/community/10/w/api-documentation/61593/show-group-rest-endpoint. Y
ou would need to first request the current group to get the Parent Group ID and then again with the Parent Group ID to return the parent's name.
Hi Michael kelley,
Actually my requirement is to show group information of each group.
so am getting the list using widget extensions as below
#set($pagedListResponse = $core_v2_group.List("%{GroupTypes = 'All', IncludeAllSubGroups ='false' }")) #foreach($group in $pagedListResponse) $group.Id $group.Name $group.ParentGroupId $group.GroupType $group.DateCreated #end
But i also need the Root Group of each Group.
Ex:-Root--child1----child2-----child3
here child3 clustergroup is Root(i need to get this)
for each child root group is Root
You can retrieve the parent group for each group inside the foreach loop.
#foreach($group in $pagedListResponse) $group.Id $group.Name $group.ParentGroupId $group.GroupType $group.DateCreated #set($parentGroup = $core_v2_group.Get("%{Id = $group.ParentGroupId }")) Parent: $parentGroup.Name <br /> #end
I need the root of the group not its parent group
Ex : rootgroup---- childgroup1---- childgroup2---childgroup3
Here the root for each child is rootgroup
I need the root of the group not its parent group
Ex : rootgroup---- childgroup1---- childgroup2---childgroup3
Here the root for each child is rootgroup
The Root group of every group is the same, so $core_v2_group.Root will get you that.