Returns the current level of a process unit.
<HsvProcessFlow>.GetState lScenario, lYear, lPeriod, lEntity, lParent, lValue, psProcessState
Long (ByVal). The member ID of the process unit's Scenario dimension member. | |
Long (ByVal). The member ID of the process unit's Year dimension member. | |
Long (ByVal). The member ID of the process unit's Period dimension member. | |
Long (ByVal). The member ID of the process unit's child Entity dimension member. | |
Long (ByVal). The member ID of the process unit's parent Entity dimension member. | |
Long (ByVal). The member ID of the process unit's Value dimension member. | |
Integer. Returns the level constant that identifies the process unit’s current level. The valid return values are listed in Table 136, CEnumProcessFlowStates Enumeration. |
This example tests whether a process unit’s current level is Not Started. The calls to the user-defined GetMemberID function get the process unit’s member IDs; for information on GetMemberID, see the Examples for GetItemID. These member IDs are then passed to GetState. If GetState returns 1, then the current level is Not Started, and any code placed within the If structure would be executed.
Dim lScen As Long, lYear As Long, lPer As Long
Dim lEnt As Long, lPar As Long, lVal As Long
Dim cHsvProcessFlow As HsvProcessFlow, iState As Integer
lScen = GetMemberID(DIMENSIONSCENARIO, "Budget")
lYear = GetMemberID(DIMENSIONYEAR, "2001")
lPer = GetMemberID(DIMENSIONPERIOD, "August")
lEnt = GetMemberID(DIMENSIONENTITY, "Connecticut")
lPar = GetMemberID(DIMENSIONENTITY, "UnitedStates")
lVal = GetMemberID(DIMENSIONVALUE, "USD")
Set cHsvProcessFlow = m_cHsvSession.ProcessFlow
cHsvProcessFlow.GetState lScen, lYear, lPer, lEnt, lPar, lVal, _
iState
If iState = 1 Then
…
End If