GetFrequency

Returns the ordinal position of a period within an application’s base frequency, and also returns the ID of the base frequency.

Syntax

<HsvPeriods>.GetFrequency lPeriod, plFreq, plPeriodNumInFreq

Argument

Description

lPeriod

Long (ByVal). The member ID of the period.

plFreq

Long. Returns the internal ID number of the application’s base frequency.

plPeriodNumInFreq

Long. Returns the ordinal position of the period within the base frequency. This is a zero-based value, with 0 equalling the first period, 1 equalling the second period, and so on.

Example

The following example tests whether July is the first period in the base frequency. If so, then GetFrequency’s plPeriodNumInFreq argument returns 0, and any code placed within the If structure would be executed.

Dim cTreeInfo As IHsvTreeInfo, cPeriods As HsvPeriods
Dim lID As Long, lFreq As Long, lPerPosition As Long
Set cTreeInfo = m_cMetadata.Periods
Set cPeriods = m_cMetadata.Periods
lID = cTreeInfo.GetItemID("July")
cPeriods.GetFrequency lID, lFreq, lPerPosition
If lPerPosition = 0 Then
  …
End If