Entity Parent Under a Specific Hierarchy
Hello -
I am am trying to produce the parent for an entity under Gathering_Processing segment node. However, because this entity is shared, the parent entity returned by the VB below is not the one I need. The parent returned is RRC_STXGasUtility which is flat hierarchy and includes the entity in question. Can you please advise?
Dim ggpelimftr As String = "E#Gathering_Processing.Descendants"
Dim ggpList As List(Of MemberInfo) = api.Members.GetMembersUsingFilter(api.pov.EntityDim.DimPk, ggpelimftr, Nothing)
For Each ggpe As MemberInfo In ggpList
Dim parentIdstring As String = String.Empty
Dim ParentList As List (Of Member) = api.Members.GetParents(api.Pov.Entitydim.DimPk,ggpe.Member.MemberId,False)
Dim ParentMember As String = ParentList.First.ToString
Dim ParentArray() As String = Split(ParentMember)
parentIdstring = ParentArray(2).Replace(",", "")
parentId = Convert.toInt32(parentIdstring)
Next