GetStatus

Returns the transaction status, metadata status, and calculation status of a cell. The bIncludeTransType argument enables you to exclude the transaction status from the return value.

Note:

To return additional cell status information, use GetStatusEx.

Syntax

<HsvData>.GetStatus(lScenario, lYear, lPeriod, lView, lEntity, lParent, lValue, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, bIncludeTransType, plStatus)

Argument

Description

lScenario

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

lYear

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

lPeriod

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

lView

Long (ByVal). The member ID of the cell's View dimension member.

lEntity

Long (ByVal). The member ID of the cell's Entity dimension member.

lParent

Long (ByVal). The member ID of the parent of the lEntity argument's entity.

lValue

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

lAccount

Long (ByVal). The member ID of the cell's Account dimension member.

lICP

Long (ByVal). The member ID of the cell's Intercompany Partner dimension member.

lCustom1

Long (ByVal). The member ID of the cell's Custom 1 dimension member.

lCustom2

Long (ByVal). The member ID of the cell's Custom 2 dimension member.

lCustom3

Long (ByVal). The member ID of the cell's Custom 3 dimension member.

lCustom4

Long (ByVal). The member ID of the cell's Custom 4 dimension member.

bIncludeTransType

Boolean (ByVal). Determines whether the cell’s transaction status will be returned in the plStatus argument. Specify TRUE to return the transaction status, otherwise FALSE.

plStatus

Long. Returns the cell’s status. For details on cell statuses, see About Cell Statuses.

Return Value

Integer. Indicates the success of the function call; returns 0 for success or an error code for failure.

Example

The following example tests a cell’s status to determine whether the cell requires consolidation. GetStatus’s returned cell status is assigned to the lStat variable. The If statement performs a bitwise comparison to see if the cell’s status includes the calculation status for requiring consolidation, which is represented by the CELLSTATUS_NEEDSCONSOLIDATION constant. If lStat contains this status, then any code placed within the If structure would be executed. The example assumes that the variables in GetStatus’s member ID arguments were passed from another procedure.

Dim cData as HsvData, lStat as Long
Set cData = m_cHsvSession.Data
cData.GetStatus m_lScen, m_lYear, m_lPer, m_lView, m_lEnt, _ 
m_lPar, m_lVal, m_lAcct, m_lICP, m_lCust1, m_lCust2, _ 
m_lCust3, m_lCust4, True, lStat
If (CELLSTATUS_NEEDSCONSOLIDATION And lStat) Then
  …
End If