Forum Discussion
Gidon_Albert
3 years agoContributor II
Right. So the problem is that the initial data buffer does not generate any cells because there are no cells with data. In other words, the anchor is empty so there is nothing to loop through.
JackLacava
OneStream Employee
3 years agoYes. A different approach, starting from scratch, should work but it's very low level and somewhat tedious. This is a rought start that should work (not tested...
'create a new PK for each cell, describing the intersection
Dim newPk As New DataBufferCellPk()
newPk.AccountId = api.Members.GetMemberId(dimtype.Account.id, "myacc")
newPk.FlowId = api.Members.GetMemberId(dimtype.Flow.Id, "myflow")
'... set all dimensions ...
' create a new cell with the pk. There are other constructors too.
Dim newCell As New DataBufferCell(newPk, 10.0, DataCellStatus.CreateDataCellStatus(False, False))
' create the buffer, put cell(s) in it
Dim newBuffer As New DataBuffer()
newBuffer.SetCell(si, newCell)
' trigger saving to database
Dim dest As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("")
api.Data.SetDataBuffer(newBuffer, dest)
Related Content
- 2 years ago
- 3 years ago
- 2 years ago
- 2 years ago