Obtain entities in a BR for comparison

Marco
Contributor

Hi Everyone.

What I want to do is to obtain the child entities of an element, to save them in a variable and compare them with the entities that are traversed in a data management, I would like to know how I can do this in addition to how I can get in a BR the value of an intersection, as if it were in excel.

Example the childrens of this.

Marco_0-1719854088428.png

 

1 REPLY 1

FredLucas
Contributor II

Hi @Marco,

In order to get the base members of a specific member you can use the function below:

objList = api.Members.GetBaseMembers(dimPk, memberId, dimDisplayOptions)

I'm not sure I understood your question but if what you want is to do a check to see if the entity passed on the DataManagement is a base member of that specific parent entity then you could do something like this:

Dim hardcodedParentEntityName = "GroupA"
Dim hardcodedParentEntityID As Integer = api.Members.GetMemberId(dimTypeId.Entity, hardcodedParentEntityName)
Dim entityDimPK As DimPK = api.Pov.EntityDim.DimPk
						
Dim isValidEntity As Boolean = api.Members.IsBase(entityDimPK, hardcodedParentEntityID, api.Pov.Entity.MemberId)
						
If isValidEntity Then
  '...
End If

 

With regards to getting the value of a specific intersection you can use the following:

'Ensure you have the full POV defined here - For DU dimensions if no members are specific it will use the ones defined by the DataManagement
Dim cellAmount As Decimal = api.Data.GetDataCell("A#ABC:U1#A:U2#B.....").CellAmount

 

Please sign in! Marco