Returns a two-dimensional array that indicates whether the periods for a scenario and year are opened, unopened, or closed.
<HsvJournals>.GetPeriodStatusList lCategory, lYear, pvarlarrIDs
Long (ByVal). The member ID of the Scenario dimension member. | |
Variant array. Returns a two-dimensional array, with the first dimension listing the periods’ member IDs and the second dimension listing the periods’ statuses. The valid return values for the second dimension are represented by the HFMConstants type library constants listed in Period Status Constants. The first dimension is returned as a Long subtype, and the second dimension is returned as an Integer subtype. |
This example prints the labels of the open periods to the Immediate window by looping through the array returned by GetPeriodStatusList. The calls to the user-defined GetMemberID function get the example’s Scenario and Year member IDs; for details on GetMemberID, see the Examples for IHsvTreeInfo.GetItemID.
Dim lScen As Long, lYear As Long, vaIds
Dim cTreeInfo As IHsvTreeInfo, sPer As String
Set cTreeInfo = m_cHsvMetadata.Periods
lScen = GetMemberID(DIMENSIONSCENARIO, "Actual")
lYear = GetMemberID(DIMENSIONYEAR, "2000")
Set m_cHsvJournals = m_cHsvSession.Journals
m_cHsvJournals.GetPeriodStatusList lScen, lYear, vaIds
For i = LBound(vaIds, 2) To UBound(vaIds, 2)
If vaIds(1, i) = JPS_OPENED Then
cTreeInfo.GetLabel vaIds(0, i), sPer
Debug.Print sPer & " is open."
End If
Next i