GetDataBuffer Function

GetDataBuffer retrieves a Data Unit’s values during a particular consolidation, calculation, or translation. When using GetDataBuffer, this is equivalent to the source data buffer or to the right side of the equation for Api.Data.Calculate. Depending on which GetDataBuffer function you are using, three or four properties can be used. 

For the basic GetDataBuffer, three properties are used:

  • ScriptMethodType As DataApiScriptMethodType

  • SourceDataBufferScript As String

  • ExpressionDestinationInfo As ExpressionDestinationInfo

The scriptMethodType typically uses the Calculate option for DataApiScriptMethodType.

The sourceDataBufferScript is equivalent to the right side of the equation for the Api.Data.Calculate.

The expressionDestinationInfo is equivalent to the left side of the equation for the Api.Data.Calculate. Frequently, this gets manipulated using the Dimension Id, passing in the Dimension Member Id for the data buffer primary key.

The GetDataBuffer can be used in various ways, and is not limited to the following:

  1. Use Data Buffers to perform Data Buffer math. In some cases, this can perform better than an Api.Data.Calculate.

  2. Use GetDataBuffer in place of Api.Data.Calculate to use in Sub routines which execute code and instructions, are stored in memory, and are used within Functions throughout Finance Business Rules.