Forum Discussion
BenEppel
4 days agoNew Contributor III
Something like this should work
Dim sourceBuffer1 As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(S#" & sSourceForecast & ":V#PERIODIC,A#Top.Base,O#AdjInput,O#Forms)")
sourceBuffer1.LogDataBuffer(api,"sourceBuffer1",10000)
If (Not sourceBuffer1 Is Nothing) Then
Dim resultBuffer1 As New DataBuffer()
For Each sourceCell As DataBufferCell In sourceBuffer1.DataBufferCells.Values
Dim resultCell As New DataBufferCell(sourceCell)
If sourceCell.CellStatus.StorageType=DataCellStorageType.Input _
Or sourceCell.CellStatus.StorageType=DataCellStorageType.Journals _
Or sourceCell.CellStatus.StorageType=DataCellStorageType.DurableCalculation Then
resultCell.CellAmount = sourceCell.CellAmount
resultBuffer1.SetCell(si, resultCell,True)
End If
Next
Dim destination As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("V#PERIODIC")
api.Data.SetDataBuffer(resultBuffer1, destination,,,,,,,,,,,,,True)
End If
The sourceBuffer1.LogDataBuffer(api,"sourceBuffer1",10000) line logs the data on the error log so you can see what is coming through. You can also pull all the data within one databuffer. If you ever need to combine them, you can do this: sourceBuffer1a += sourceBuffer1b. This will combine 1a with 1b.
Related Content
- 12 months ago
- 2 years ago