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 or EnumDataAuditItems2. 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

<HFMwData>.GetCellHistory2 lScenario, lYear, lPeriod, lEntity, lParent, lValue, lICP, lAccount, lCustom1, lCustom2, lCustom3, lCustom4, pvaravarbstrServers, pvaravarbstrUserNames, pvaravardTimeModified, pvaravarlActivityCode, pvarabstrValues, pvaravarlNoData

Argument

Description

lScenario

The member ID of the cell’s Scenario dimension member.

Input argument. Long subtype.

lYear

The member ID of the cell’s Year dimension member.

Input argument. Long subtype.

lPeriod

The member ID of the cell’s Period dimension member.

Input argument. Long subtype.

lEntity

The member ID of the cell’s Entity dimension member.

Input argument. Long subtype.

lParent

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

Input argument. Long subtype.

lValue

The member ID of the cell’s Value dimension member.

Input argument. Long subtype.

lICP

The member ID of the cell’s Intercompany Partner dimension member.

Input argument. Long subtype.

lAccount

The member ID of the cell’s Account dimension member.

Input argument. Long subtype.

lCustom1

The member ID of the cell’s Custom 1 dimension member.

Input argument. Long subtype.

lCustom2

The member ID of the cell’s Custom 2 dimension member.

Input argument. Long subtype.

lCustom3

The member ID of the cell’s Custom 3 dimension member.

Input argument. Long subtype.

lCustom4

The member ID of the cell’s Custom 4 dimension member.

Input argument. Long subtype.

pvaravarbstrServers

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

Note:

This is a 1-based array.

Input/output argument.

pvaravarbstrUserNames

Returns an array containing the usernames of the users who made the data changes.

Note:

This is a 1-based array.

Input/output argument.

pvaravardTimeModified

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

Input/output argument.

pvaravarlActivityCode

Returns an array containing 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.

Input/output argument.

pvarabstrValues

Returns an array containing the cell values that the data changes resulted in. Cell values are returned as formatted strings.

Note:

This is a 1-based array.

The values are formatted according to the user’s preferences for decimal separator and thousands separator characters. If you want to programmatically get and set these preferences, use the HFMwSession properties decimalSeparator and thousandsSeparator.

Input/output argument.

pvaravarlNoData

Returns an array containing that indicates whether cells contain data or no data. Valid values are as follows:

  • 0 - The cell contains data.

  • 1 - The cell contains no data.

Input/output argument.

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, lPar, lVal, lIcp, lAcct, lCust1, lCust2, _
   lCust3, lCust4)
Dim cHFMData, vaServers, vaUsers, vaTime, vaActivity
Dim vaVal, vaNoData, vaRet(), lItems
'cHFMSession is an HFMwSession object reference.
Set cHFMData = Server.CreateObject("Hyperion.HFMwData")
' cHFMSession is a previously set HFMwSession object
cHFMData.SetWebSession cHFMSession
cHFMData.GetCellHistory2 lScen, lYear, lPer, lEnt, lPar, 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 + 1)
       vaRet(i, 2) = vaVal(i + 1)
   Next
   GetCellDatesUsersValuesStr = vaRet
Else
   GetCellDatesUsersValuesStr = ""
End If
End Function