Returns an array containing the labels of given Period dimension member’s descendants at the specified frequency of the application’s frequency hierarchy.
<HFMwPeriods>.GetDescendantsAtFrequency (bstrPeriod, lFreq)The label of the Period dimension member. The specified period must be at a higher level in the frequency hierarchy than the frequency specified in the lFreq argument. | |
The internal ID of the frequency that contains the descendants to be returned. You can get internal ID of a period’s frequency with GetFrequency, and the internal ID of a scenario’s default frequency with HFMwScenarios.defaultFrequency. |
Returns an array containing the labels of the descendants.
The following function returns the labels of a given period’s descendant periods at the default frequency of a given scenario. If the specified period is not at a higher level in the frequency hierarchy than the scenario’s default frequency, an empty string is returned.
Function getDescendantsDefScenFreq(sPeriod, sScenario)
Dim cHFMMetadata, cHFMPeriods, cHFMScenarios
Dim lFrequency, sRet, lDefaultFreq
Set cHFMMetadata = cHFMSession.metadata
Set cHFMPeriods = cHFMMetadata.periods
Set cHFMScenarios = cHFMMetadata.scenarios
lDefaultFreq = cHFMScenarios.defaultFrequency(sScenario)
lFrequency = cHFMPeriods.GetFrequency(sPeriod)
If lDefaultFreq > lFrequency Then
sRet = cHFMPeriods.GetDescendantsAtFrequency(sPeriod, _
lDefaultFreq)
Else
sRet = ""
End If
getDescendantsDefScenFreq = sRet
End Function