GetDataBuffer Functions

A Member Script may not be defined for the Api.Data.Calculate function because multiple Data Cells, which seem completely unrelated to each other, are being processed and none of the Dimension Members are constant. For those situations, use the GetDataBuffer and SetDataBuffer functions.

GetDataBuffer and SetDataBuffer are more fundamental than using an Eval function. They allow you to read numbers using a Member Script, process or modify each cell in the result, and then save the changes. Common GetDataBuffer functions include:

  • GetDataBuffer

  • GetDataBufferForCustomShareCalculation

  • GetDataBufferForCustomElimCalculation

  • GetDataBufferUsingFormula

  • SetDataBuffer

When using api.Data.Calculate functions, it is important to know which Member a formula is attached to. For example, if the formula starts with Api.Data.Calculate(“A#Sales1 = …”), put the formula in the Sales1 account Member’s Formula setting.

However, when using GetDataBuffer functions, the formula may not be writing to a specific Member. Every Data Cell saved is possibly written to a different dimension member. In this case, the logic can be developed in a Business Rule and could be created as a Sub routine to execute throughout Finance Business Rules.