Hey BPC'ers
I'm working with the EPM VBA functions and I can't seem to get children associated with a specific dimension member using the provided functionality. I'm trying to get the following code to work:
***CODE***
Sub NonWorkingCode()
Dim EPMObj As Object
Set EPMObj = CreateObject("FPMXLClient.EPMAddInAutomation")
'Dim EPMObj As New FPMXLClient.EPMAddInAutomation
Dim conn As String
Dim Children() As String
conn = EPMObj.GetActiveConnection(ActiveSheet)
Children = EPMObj.GetChildrenFromMember("DEPT878", "PARENTH1", 1, 10, conn, True)
End Sub
***/CODE***
The function only ever returns an empty string array. A similar VBA function works just fine to return the entire hierarchy:
***Other Code***
Sub WorkingCode()
Dim EPMObj As Object
Set EPMObj = CreateObject("FPMXLClient.EPMAddInAutomation")
'Dim EPMObj As New FPMXLClient.EPMAddInAutomation
Dim conn As String
Dim Hier() As String
conn = EPMObj.GetActiveConnection(ActiveSheet)
Hier = EPMObj.GetHierarchyMembers(conn, "PARENTH1", "DPC")
End Sub
***/CODE***
My hierarchy has thousands of members, and I would rather get just the subset I need from the selected parent member. DEPT878 is a member in my "DPC" dimension that has a hierarchy labeled "PARENTH1". Does anyone have any suggestions or have had success with the GetChildrenFromMember function?
Thanks!,
Ryan