SetOBPInfo

Specifies whether the HsvPOVSelection control displays only active Entity dimension members. If you specify to display only active entities, you also can specify the Scenario, Year, and Period dimension members that determine which entities are considered active.

Note:

To test whether Organization by Period is enabled, use HsvMetadata.IsOrgByPeriodApplication.

Syntax

<HsvPOVSelection>.SetOBPInfo varbEnabled, lScenario, lYear, lPeriod

Argument

Description

varbEnabled

Boolean (ByVal). Specifies whether the control displays only active Entity members. Pass TRUE to display only active entities, FALSE otherwise.

When TRUE is passed, the Active Entities Only check box is selected on the dialog box for selecting Entity dimension member lists; the specified Scenario, Year, and Period dimensions are also displayed.

lScenario

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

lYear

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

lPeriod

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

Example

The following function enables active Entity viewing for the specified Scenario, Year, and Period dimension members. The function uses IHsvTreeInfo.GetItemID to get the member IDs for the passed Scenario, Year, and Period member labels. These IDs are then passed to SetOBPInfo.

Sub setObpFromLabels(sScen As String, sYear As String, _
   sPer As String)
Dim cTreeInfo As IHsvTreeInfo, lScen As Long
Dim lYear As Long, lPer As Long
'g_cMetadata is a previously set HsvMetadata instance
Set cTreeInfo = g_cMetadata.Scenarios
lScen = cTreeInfo.GetItemID(sScen)
Set cTreeInfo = g_cMetadata.Years
lYear = cTreeInfo.GetItemID(sYear)
Set cTreeInfo = g_cMetadata.Periods
lPer = cTreeInfo.GetItemID(sPer)
'cFormPOV represents an initialized HsvPOVSelection control
cFormPOV.SetOBPInfo True, lScen, lYear, lPer
End Sub