The Member Script and Value Approach
I ran across an issue the other day that deserves writing about. I was trying to write to a member intersection, from a Custom Calculate Data Management Step, that was outside of the Data Unit defined in the Custom Calculate Data Management Step.
The Finance Business Rule that was being run was using an api.data.calculate approach, which unfortunately fails when trying to write outside of the data unit.
Dim strSource As String = "Cb#CAN_ACT:E#ONT_County1:C#None:S#Actual:T#2021M2:V#Periodic:A#A_69010:F#None:0#Forms:I#None"
api.Data.Calculate("Cb#CAN_ACT:E#ONT_County1:C#None:S#Actual:T#2021M3:V#Periodic:A#A_69010:F#None:0#Forms:I#None = " & strSource, True)
If you try to use api.data.setDataCell, you get the same error.
api.Data.Calculate("Cb#CAN_ACT:E#ONT_County1:C#None:S#Actual:T#2021M3:V#Periodic:A#A_69010:F#None:0#Forms:I#None = " & strSource, True)
Solution: Using BRApi.Finance.Data.SetDataCellsUsingMemberScript
Step 1. Dim a List of MemberScriptAndValue. This will hold all the Member Script and Value combinations that you want to write to.
Dim 1stMemScriptAndValue As New List(Of MemberScriptAndValue)
Step 2. Dim a MemberScriptAndValue object. This object has several properties that will be used to define the Member Script, the Amount (Value) and if it contains data.
Dim msvMemScriptandValue As New MemberScriptAndValue
Step 3. Define the properties of the MemberScriptAndValue object that you instantiated. IsNoData is an interesting property, if you set this to True it clears the amount from the data cell.
msvMemScriptandValue.IsNoData = False ' If Set to True it will clear the data from the data intersection
msvMemScriptandValue.Amount = 700 'Target Member Script to be written to
msvMemScriptandValue.Script = 'Cb#CAN_ACT:E#ONT_County1:C#None:S#Actual:T#2021M3:V#Periodic:A#A_69010:F#None:0#BeforeAdj:I#None'
Step 4. Add the MemberScriptAndValue object that you just defined to the list object of MemberScriptAndValue that you created in Step 1. If you have multiple scripts, you can iterate through your member script combinations and add each of them to your list object. It can hold more than 1 MemberScriptAndValue definition. I have used this to hold hundreds of defined MemberScriptAndValue combinations.
1stMemScriptAndValue.Add(msvMemScriptAndValue)
Step 5. Write the list MemberScriptAndValue to the cube using BRApi.Finance.Data.SetDataCellsUsingMemberScript. Note that the if then in the code below will return an error if any of your member scripts are inaccurate.
If 1stMemScriptAndValue.Count > 0 Then
Dim objXFResult As XFResult = BRApi.Finance.Data.SetDataCellsUsingMemberScript(si, 1stMemScriptAndValue)
If Not objXFResult.BoolValue Then
Throw ErrorHandler.LogWrite(si,objXFResult.Message,String.empty))
End If
End If
This example only writes a single member script and value combination to the cube, however I have used it to load the contents of a user loaded CSV file. The CSV File was first loaded to a custom SQL Table in the Application database. Then the contents of that SQL Table were retrieved into a VB.Net Data Table stored in memory. Then the rows of the data table were looped through, generating a Member Script and Value object with the Script, Amount and isNoData properties being defined for each row in the data table. The MemberScriptAndValue object would then be added to the list of MemberScriptAndValue object. Once the Data Table was completely looped through the list of MemberScriptAndValue object was then written to the OneStream cube.
Keep in mind that MemberScripAndValue writes to O#Forms and has a Storage Type of Input, even though it is the result of a calculation.
The business rule in its entirety, with a bonus section showing how to write the contents of your MemberScriptAndValue list to the error log is shown below.
Public Function MSV(ByVal si As SessionInfo, ByVal globals as BRGlobals, ByVal api As FinanceRuleApi, ByVal args As FinanceRulesArgs)
Try
Dim 1stMemScriptAndValue As New List(Of MemberScriptAndValue)
Dim msvMemScriptandValue As New MemberScriptAndValue
msvMemScriptandValue.IsNoData = False ' If Set to True it will clear the data from the data intersection
msvMemScriptandValue.Amount = 700 'Target Member Script to be written to
msvMemScriptandValue.Script = 'Cb#CAN_ACT:E#ONT_County1:C#None:S#Actual:T#2021M3:V#Periodic:A#A_69010:F#None:0#BeforeAdj:I#None'
1stMemScriptAndValue.Add(msvMemScriptAndValue)
If 1stMemScriptAndValue.Count > 0 Then
Dim objXFResult As XFResult = BRApi.Finance.Data.SetDataCellsUsingMemberScript(si, 1stMemScriptAndValue)
If Not objXFResult.BoolValue Then
Throw ErrorHandler.LogWrite(si, NewXFException(si,objXFResult.Message,String.empty))
End If
End If
'Write MemberScriptAndValue contents to error log
Dim logger As New Text.StringBuilder
For Each msv In 1stMemScriptAndValue
logger. AppendLine("MSV Script = " & msv.Script & " Amount = " & msv.Amount & " IsNoData = " & msv.IsNoData)
Next
brapi.ErrorLog.LogMessage(si, logger.ToString)
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si,ex))
End Try
End Function
Partner SpotLight
OneStream aligns to your business needs and changes more quickly and easily than any other product by offering one platform and one model for all financial CPM solutions. OneStream employs Guided Workflows, validations and flexible mapping to deliver data quality confidence for all collections and analysis while reducing risk throughout the entire auditable financial process.
Case Studies
Accumen
Thanks to the intervention of MindStream Analytics, Accumen's Finance department can now model their business with a new, more organized structure that isn't conventionally available in NetSuite.
Acme Brick
Acme Brick turned to MindStream Analytics for help implementing OneStream to replace their outdated TM1 solution.
Alterra
Alterra sought the expertise of MindStream to address the challenges they faced in their Capital Planning process.
ATCO Group
Energy conglomerate ATCO operates worldwide in utilities, power generation, and related services.
Avalon
Working with MindStream Analytics, Avalon Healthcare Solutions adopts NetSuite Planning and Budgeting to accelerate budgeting and forecasting processes.
Bayer Health Care
Bayer Healthcare implemented Hyperion Planning and Workforce Planning in 10 weeks to dramatically streamline their Income Statement budget and Workforce Planning process..
BluEarth
MindStream Analytics' partnership with BluEarth Renewables epitomizes the power of technology and collaboration.
Celgene
An Oracle Hyperion Planning Upgrade provides multi-national organization Hyperion Application optimization and stabilization.
Cleaver Brooks
OneStream XF was chosen as the platform that would transform Cleaver-Brooks' Finance processes.
CoorsTek
The collaboration between CoorsTek and MindStream resulted in significant improvements in CoorsTek's financial consolidation and reporting processes.
Elite Body Sculpture
MindStream Analytics' collaboration with Elite Body Sculpture encapsulates the transformative potential of targeted tech solutions in streamlining administrative processes.
Enlyte
Enlyte, a merger of Mitchell, Genex, and Coventry, faced challenges with disparate financial solutions and the need for combined reporting.
Flanders
MindStream Analytics collaborated with Flanders to implement OneStream Consolidation and Reporting solution.
Foley Products
Foley Products was facing a significant challenge with its Excel-based actual management reporting system.
Harte Hanks
The collaboration between MindStream Analytics and Harte Hanks culminated in a highly customized, user-friendly NetSuite implementation.
Interface
Interface used a complex, manual, excel-based FP&A process for monthly review, and the summary data was loaded in OneStream.
Kymera International
Thanks to Mindstream Analytics' assistance, Kymera was able to load all of their data into OneStream and validate it successfully.
MacLean Fogg
MacLean-Fogg partnered with MindStream, a leading implementor specializing in modernizing and optimizing enterprise systems.
MEPPI
MindStream's expertise and experience were sought to conduct a vendor selection initiative focusing on MEPPI's F2023 planning process.
OUAI
MindStream Analytics and OUAI's collaboration showcases the transformative power of strategic technological intervention.
Plaskolite
By migrating to OneStream, Plaskolite has achieved a material reduction in consolidation time and overall Financial Close cycle, eliminated the hours spent compiling and verifying data in Excel, streamlined its Planning, Budgeting and Forecasting model and delivered flexible and timely reporting that enables more strategic analysis of their financial data.
Redwire
Understanding the nuances of Redwire's challenges, MindStream Analytics devised a holistic approach to overcome them. The implementation of NetSuite was just the beginning.
Simon
Simon's existing corporate Hyperion Financial Management (HFM) production application was consolidating at a rate of seven hours, a performance issue causing great headache to corporate Accounting.
Source Code
The successful transition to OneStream revolutionized Source Code's financial reporting.
Subway
Subway collaborated with MindStream Analytics for the NetSuite Analytics Warehouse implementation.
UPenn
MindStream Consulting and AppCare team members are proud be working side by side with UPenn university in accomplishing this implementation and along with continuing our AppCare services after go-live.
USG
USG was an Oracle Hyperion customer realizing that it needed more specialized support for its various Oracle Hyperion applications.
Vantiv
Dividing a hyperion planning application, expanding the hyperion footprint to forecast on the business? Customer categories.
Versant Health
Versant Health engaged MindStream to help resolve the challenges they were experiencing with their consolidation, close, and financial reporting processes.
Virginia Spaceport Authority
The MindStream team implemented the Standard + Workforce NetSuite Planning & Budgeting.
WeWork
MindStream Analytics determined that the best solution was to implement Oracle Essbase Cloud as part of the Oracle Analytics Cloud (OAC) platform-as-a-service
WindStream
Innovative use of essbase to streamline and connect hyperion financial management for enhanced financial analysis.
XY Planning
MindStream Analytics, well-versed in addressing such challenges, presented a comprehensive Netsuite solution for XY Planning.