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 GetMembersUsingFilter function, and I would like to capture the Display Member Group associated with each UD member.

Any guidance or suggestions would be greatly appreciated.

Thank you in advance!

  • 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}")



1 Reply

  • FredLucas's avatar
    FredLucas
    Icon for OneStream Employee rankOneStream Employee

    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}")