Forum Discussion
I have done something similar and got it to work:
In this case, I extended horizontally so Actual is at a more granular level to my Forecast scenario. It's 4 lines of code.
#1 I set my destination to write to O#Import
#2 I set my source buffer which is Actuals
#3 I create another buffer to do the conversion
#4 I write the converted buffer to my destination
I put this code into a Finance BR that I fire from a DM Sequence, so I don't need to specify the Forecast scenario in the target because OneStream will pick it up from my DM Step.
Dim destination As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("O#Import")
Dim sourceActualsBuffer As DataBuffer = api.Data.GetDataBuffer(DataApiScriptMethodType.Calculate, "Cb#PLANNING:S#Actual:O#BeforeAdj:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None",destination)
Dim summaryPlanBuffer As DataBuffer = api.Data.ConvertDataBufferExtendedMembers("PLANNING", "Actual", sourceActualsBuffer)
api.Data.SetDataBuffer(summaryPlanBuffer, destination)
Related Content
- 3 years ago
- 11 months ago
- 3 years ago