Forum Discussion

NoorMohd's avatar
NoorMohd
New Contributor
1 month ago
Solved

Get UD member Display member Group

  Hello OneStreamers, Good day! Could you please guide me on how to retrieve the Display Member Group for a UD dimension member? I am currently looping through UD1 members using a GetMembersUsing...
  • FredLucas's avatar
    1 month ago

    Hi,

    The GetMemberUsingFilter function returns a list of MemberInfo.
    You can get the Display Member Group ID and/or Name out of each Member Info object this way:

    Dim UD1mbrName As String = "Ud1MemberName"
    
    Dim DimName As String = "Ud1DimensionName"
    Dim mbrInfo As MemberInfo = BRApi.Finance.Metadata.GetMember(si, dimTypeId.UD1, UD1mbrName)
    
    Dim displayMbrGroupId As Guid = mbrInfo.Member.DisplayMemberGroupUniqueID
    
    Dim grpInfoex As GroupInfoEx = BRApi.Security.Admin.GetGroupInfoEx(si,displayMbrGroupId)
    Dim displayMbrGroupName As String = grpInfoex.GroupInfo.Group.Name
    
    brapi.ErrorLog.LogMessage(si, $"UD1: {UD1mbrName}; display group: {displayMbrGroupName}")