Error saving a data buffer in Custom Calculate
Hi Community,
I try to save a simple data buffer within a Custom Calculate and receive a cryptic error message.
Dim sourceDataBuffer1 As New DataBuffer
sourceDataBuffer1 = api.Data.GetDataBufferUsingFormula("FilterMembers(C#Local,UD8#None)")
sourceDataBuffer1.LogDataBuffer(api,"sourceDataBuffer1",100)
Dim resultDataBuffer1 As DataBuffer = New DataBuffer()
For Each cell As DataBufferCell In sourceDataBuffer1.DataBufferCells.Values
Dim sCell As New DataBufferCell(cell)
api.LogMessage(sCell.DataBufferCellPk.GetMemberScript(api))
resultDataBuffer1.SetCell(api.SI, sCell, True)
Exit For
Next
resultDataBuffer1.LogDataBuffer(api,"resultDataBuffer1",100)
api.Data.SetDataBuffer(resultDataBuffer1, api.Data.GetExpressionDestinationInfo(String.Empty))
When I start the Custom Calculate from data management, I select a base entity and C#Local, scenario and time. The code will write a log with an usual POV of the cell without common members (line 7) and also log the restultdatabuffer1 with 1 cell (line 11).
But running into line 12 will cause the error. Summary and description only show "Error processing script ''." without further details.
Summary: Error processing script ''.
----------------------------------------
Description: Error processing script ''.
[...]
----------------------------------------
Exception Type: XFException
Thread Id: 249
Message: Error processing script ''.
Source code: line 0, method SetDataBuffer
----------------------------------------
Exception Type: XFException
Thread Id: 249
Source code: line 0, method SetDataBuffer
----------------------------------------
Exception Type: XFException
Thread Id: 249
Source code: line 0, method SetDataCells
----------------------------------------
Exception Type: XFException
Thread Id: 249
Source code: line 0, method SetDataCell
----------------------------------------
Exception Type: XFException
Thread Id: 249
Source code: line 0, method SetData
----------------------------------------
Exception Type: XFException
Thread Id: 249
Source code: line 0, method DetermineInputView
Within a regular calculation script, the data buffer will be saved correctly.
Any idea what the issues could be?
Thanks,
Marcus
Hi Henning,
thanks. I'll keep that in mind and will provide an update, if I do further testing in the GolfStream application (as soon as there is some time). At the moment I'm just happy that it works on the client's application with setting the View member.
Best,
Marcus