GetState

Returns the current level of a process unit.

Syntax

<HsvProcessFlow>.GetState lScenario, lYear, lPeriod, lEntity, lParent, lValue, psProcessState

Argument

Description

lScenario

Long (ByVal). The member ID of the process unit's Scenario dimension member.

lYear

Long (ByVal). The member ID of the process unit's Year dimension member.

lPeriod

Long (ByVal). The member ID of the process unit's Period dimension member.

lEntity

Long (ByVal). The member ID of the process unit's child Entity dimension member.

lParent

Long (ByVal). The member ID of the process unit's parent Entity dimension member.

lValue

Long (ByVal). The member ID of the process unit's Value dimension member.

psProcessState

Integer. Returns the level constant that identifies the process unit’s current level. The valid return values are listed in Table 136, CEnumProcessFlowStates Enumeration.

Example

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