GetCellHistory2

Returns the audit history of a cell’s data changes, with cell values returned as formatted strings. Audit information is returned in arrays that have a one-to-one correspondence.

To enumerate the history of multiple cells, use EnumDataAuditItems. To return a cell’s data changes with cell values returned as Doubles, use GetCellHistory.

Note:

An application stores audit histories only if the audit-related application settings have been turned on. For more information, see the Oracle Hyperion Financial Management, Fusion Edition Administrator's Guide.

Syntax

<HsvData>.GetCellHistory2 lScenario, lYear, lPeriod, lEntity, lParent, lValue, lICP, lAccount, lCustom1, lCustom2, lCustom3, lCustom4, pvarabstrServers, pvarabstrUserNames, pvaradTimeModified, pvaralActivityCode, pvarabstrValues, pvaralNoData

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.

lEntity

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

lParent

Long (ByVal). You must pass the MEMBERNOTUSED constant to this argument. For information on this constant, see Dimension Member Constants.

lValue

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

lICP

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

lAccount

Long (ByVal). The member ID of the cell's Account 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.

pvarabstrServers

Variant array. Returns the names of the application servers on which the data changes were made.

The array items are returned as a String subtype.

pvarabstrUserNames

Variant array. Returns the usernames of the users who made the data changes.

The array items are returned as a String subtype.

pvaradTimeModified

Variant array. Returns the timestamps of the data changes. These are returned as Double values that can be cast to the Date format.

The array items are returned as a Double subtype.

pvaralActivityCode

Variant array. Returns the IDs of the user activities that caused the data changes. Valid values are represented by the HFMConstants type library constants listed in User Activity Constants.

The array items are returned as a Long subtype.

pvarabstrValues

Variant array. Returns the cell values that the data changes resulted in. The values are formatted according to the user’s preferences for decimal separator and thousands separator characters.

Tip:

To programmatically get and set these preferences, use the GetNumberFormattingUserParameters and SetNumberFormattingUserParameters methods of the HsvSystemInfo object.

The array items are returned as a String subtype.

pvaralNoData

Variant array. Indicates whether cells contain data or no data. Valid values are as follows:

  • 0 - The cell contains data.

  • 1 - The cell contains no data.

The array items are returned as a Long subtype.

Example

The following function returns a three-dimensional array containing the timestamps, users, and values of changes to a given cell. Note that if no changes have been made to the cell, the function returns a blank string instead of an array.

Function GetCellDatesUsersValuesStr(lScen, lYear, _ 
   lPer, lEnt, lVal, lIcp, lAcct, lCust1, lCust2, _ 
   lCust3, lCust4) As Variant
Dim cData As HsvData, vaServers, vaUsers, vaTime
Dim vaActivity, vaVal, vaNoData, vaRet(), lItems
'm_cHsvSession is an HsvSession object reference.
Set cData = m_cHsvSession.Data
cData.GetCellHistory2 lScen, lYear, lPer, lEnt, MEMBERNOTUSED, _ 
   lVal, lIcp, lAcct, lCust1, lCust2, lCust3, lCust4, _ 
   vaServers, vaUsers, vaTime, vaActivity, vaVal, vaNoData
lItems = UBound(vaTime)
'If the array contains an item, the cell has a change history
If lItems >= 0 Then
   ReDim vaRet(lItems, 2)
   For i = 0 To lItems
       vaRet(i, 0) = CDate(vaTime(i))
       vaRet(i, 1) = vaUsers(i)
       vaRet(i, 2) = vaVal(i)
   Next i
   GetCellDatesUsersValuesStr = vaRet
Else
   GetCellDatesUsersValuesStr = ""
End If
End Function