ProcessManagementChangeStateForMultipleEntities2

Applies a given process management action and attaches documents to process units for one or more Entity dimension members. The specified documents are attached to the process units for all of the specified Entity members.

Syntax

<HsvProcessFlow>.ProcessManagementChangeStateForMultipleEntities2 lScenarioIn, lYearIn, lPeriodIn, varalEntity, varalParent, lValueIn, bstrAnnotation, lAction, vbUseAllValueMembers, vbApplyToAllPeriods, sProcessStateToPromoteTo, varabstrPaths, varabstrFiles, psNewProcessState

Argument

Description

lScenarioIn

Long (ByVal). The member ID of the process units’ Scenario dimension member.

lYearIn

Long (ByVal). The member ID of the process units’ Year dimension member.

lPeriodIn

Long (ByVal). The member ID of the process units’ Period dimension member.

varalEntity

Long array (ByVal). The member IDs of the process units’ child Entity dimension members.

varalParent

Long array (ByVal). The member IDs of the process units’ parent Entity dimension members. This array has a one-to-one correspondence with the varalEntity argument’s array.

lValueIn

Long (ByVal). The member ID of the process units’ Value dimension member.

bstrAnnotation

String (ByVal). A comment to apply to the action.

lAction

Long (ByVal). The action to apply to the process units. Valid values are represented by the HFMConstants type library constants listed in Process Management Action Constants.

vbUseAllValueMembers

Boolean (ByVal). A flag that determines whether the action applies to process units for Value dimension members related to the lValue member. Pass TRUE to apply the action to related process units, FALSE to apply the action to only the process units for the lValue member.

vbApplyToAllPeriods

Boolean (ByVal). A flag that determines whether the action applies to process units for all base periods. Pass TRUE to apply the action to all base periods, FALSE otherwise.

sProcessStateToPromoteTo

Integer (ByVal). The process management level to apply to the process units. Valid values are represented by the HFMConstants type library constants listed in Process Management Review Level Constants.

varabstrPaths

String array (ByVal). The paths in which the documents to be attached have been loaded. Folders in the path are delimited by backslashes ( \ ).

This array has a one-to-one correspondence with the varabstrFiles argument’s array of filenames.

varabstrFiles

String array (ByVal). The file names of the documents to attach.

Note:

Files must be loaded in the folder specified by the corresponding item in the varabstrPaths argument’s array, otherwise an error will be thrown.

psNewProcessState

Integer. Returns the review level applied to the process units. Valid values are represented by the HFMConstants type library constants listed in Process Management Review Level Constants.

Example

The following example attached two documents in a folder named “docs” to the specified process units. The calls to the user-defined GetMemberID function get the process unit’s member IDs; for information on GetMemberID, see the Examples for GetItemID.

Dim lScen As Long, lYear As Long, lPer As Long, lVal As Long
Dim cProcessFlow As HsvProcessFlow, laEnts(1) As Long
Dim laPars(1) As Long, saPaths(1) As String
Dim saNames(1) As String, iState As Integer
lScen = GetMemberID(DIMENSIONSCENARIO, "Budget")
lYear = GetMemberID(DIMENSIONYEAR, "2004")
lPer = GetMemberID(DIMENSIONPERIOD, "July")
lVal = GetMemberID(DIMENSIONVALUE, "USD")
laEnts(0) = GetMemberID(DIMENSIONENTITY, "Virginia")
laEnts(1) = GetMemberID(DIMENSIONENTITY, "NewYork")
laPars(0) = GetMemberID(DIMENSIONENTITY, "UnitedStates")
laPars(1) = GetMemberID(DIMENSIONENTITY, "UnitedStates")
saPaths(0) = "docs"
saPaths(1) = "docs"
saNames(0) = "Audit.txt"
saNames(1) = "Comments.txt"
'g_cSession is an HsvSession object reference
Set cProcessFlow = g_cSession.ProcessFlow
cProcessFlow.ProcessManagementChangeStateForMultipleEntities2 lScen, lYear, lPer, _
   laEnts, laPars, lVal, "see attached", PROCESS_FLOW_ACTION_START, False, False, _
   PROCESS_FLOW_STATE_FIRST_PASS, saPaths, saNames, iState