Recent Discussions
Is it possible to pass a parameter to a UD8 dynamic calc member?
Hi all I currently have a UD8 member to do a simple variance to actuals formula, but I was wondering if it is possible pass parameters to the UD8 member formula that this could be more dynamic? My current code looks something like this: Try 'Declare base and comparison scenario variables Dim currentScenario As String = api.Pov.Scenario.Name Dim comparativeScenario As String = "Actual" 'Define pov filters Dim currentFilter As String = "S#" & currentScenario & ":U8#None" Dim comparisonFiler As String = "S#" & comparativeScenario & ":U8#None" Return api.Data.GetDataCell("BWDiff("& currentFilter & "," & comparisonFiler & ")") Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try However, I'm trying to see if there is a solution where I could have the following: Dim comparativeScenario As String = |!Comparative_Scenario_Parameter!| Thanks, MarkMarkBird2 days agoContributor III1.9KViews0likes3CommentsDashboard - How to pass a condition within a label component?
I'm trying to build a label that shows target goals for each entity. Now since each region has different goals. I'm looking for my label to change the value based on the entity selected. Here is an example (We're still in development so not the most eye catching) Its referencing a parameter -- How can I pass a condition or a rule that reads the POV entity and shows me that specific value.SolvedMustafa_A3 days agoContributor II2.3KViews1like4CommentsWrite to Elimination Member (Origin)
Hi All - I have a quick question When I am using the Data Buffer, I am able to write to the Elimination Member. The Same for the Set DataCell as well. When I try to use the same in the Member Script Value it is not writing to the Elimination Origin except forms. Any Idea why ? Below is an example ' strMemberScript = "Cb#Cube:E#100:C#Local:S#Actual:T#2022M12:V#YTD:A#123456:F#None:O#Forms:I#101:U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None" ' objMemberScriptValue.Amount = 100 ' objMemberScriptValue.IsNoData = False ' objMemberScriptValue.Script = strMemberScript ' objMemberScriptValues.Add(objMemberScriptValue) objXFResult = BRApi.Finance.Data.SetDataCellsUsingMemberScript(si, objMemberScriptValues)Krishna3 days agoValued Contributor14Views0likes0CommentsIssue calling Workspace Assembly Service factory across Maintenance Units
I am updating a customization to the Account Reconciliations solution to version 8.4 and have converted my custom business rules into a workspace assembly/assembly files. I added a custom maintenance unit to the OneStream Financial Close workspace to build said assembly and I am now having issues calling my assembly, specifically, the workspace assembly service factory file I created is not getting recognized. I found an instance of a button in the Reconciliation Manager MU where a button component calls upon the Integration assembly in the Integration MU using the following syntax: {Workspace.Current.Integration.WSMU}{OnOpenDetailItemTransactionDrillbackClick}{ItemID=[|!SelectedReconItemID_RCM!|]} I also have my Workspace Assembly Service that I created set on my custom maintenance unit: So after adding my own custom button (to appear on the Account Recs UI) in the Reconciliation Manager MU, I followed the same logic for executing the call, below is an example: {Workspace.Current.MyAssembly.WSMU}{MyFunction}{ReconID=|!SelectedReconID_RCM!|} However, I have not been able to resolve the error I'm seeing when I press the button. "Unable to find the Workspace Assembly Service Factory class for name 'Workspace.Current.MyAssembly.WSMU' in Workspace 'OneStream Financial Close' and Maintenance Unit ' '." I'm assuming it may have to do with Maintenance Unit appearing blank in that error message. Any help would be greatly appreciated!jgaptelligence7 days agoNew Contributor64Views0likes2CommentsIssue with Extensibility Rule in C# using FdxExecuteDataUnit
We are working on a POC to extract data using FdxExecuteDataUnit. We are using an Extensibility business rule and running it using a DM job. I am getting assistance from our corporate IT group as I am not good with C#. The business rule is writing data to a table and then is taking the data from the table and putting it in a text file. There is something missing or wrong with this and I am hoping someone can help with the code since I do not have access to the TechTalks that focus on FdxExecute. The code was written to do the FdxExecuteDataUnit and then also write some sample data to the table. This way if the FdxExecute does not generate any data we at least get a file with the sample data. I am getting a file but it only has the sample data spelled out in lines 100-150 of the business rule. I am also getting the following warning when I compile the rule: "1) Warning at line 54: Unreachable code detected" If I comment out that line (54) and put the cubeview name directly in the FdxExecuteDataUnit statement then I get the same warning but for line 55. using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using System.Globalization; using System.IO; using System.Linq; using Microsoft.CSharp; using OneStream.Finance.Database; using OneStream.Finance.Engine; using OneStream.Shared.Common; using OneStream.Shared.Database; using OneStream.Shared.Engine; using OneStream.Shared.Wcf; using OneStream.Stage.Database; using OneStream.Stage.Engine; namespace OneStream.BusinessRule.Extender.TEST_FDX_Csharp { public class MainClass { public object Main(SessionInfo si, BRGlobals globals, object api, ExtenderArgs args) { try { DataTable employeeData = CreateSampleData(); AppServerConfigSettings configSettings = AppServerConfig.GetSettings(si); string folderPath = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp(si, true, configSettings.FileShareRootFolder, si.AppToken.AppName) + "\\" + DateTime.UtcNow.ToString("yyyyMMdd") + "\\Extracts"; Directory.CreateDirectory(folderPath); string filePath = folderPath + "\\AppTypes.xml"; // File.Delete(filePath); // File.WriteAllText(filePath, outer.accountRecs.ToString()); string fileName = "OneStream_MassDataExtract.txt"; // Write text file ExportDataTableToFile(employeeData," ", folderPath+fileName); switch (args.FunctionType) { case ExtenderFunctionType.Unknown: break; case ExtenderFunctionType.ExecuteDataMgmtBusinessRuleStep: break; case ExtenderFunctionType.ExecuteExternalDimensionSource: // Add External Members var externalMembers = new List<NameValuePair>(); externalMembers.Add(new NameValuePair("YourMember1Name", "YourMember1Value")); externalMembers.Add(new NameValuePair("YourMember2Name", "YourMember2Value")); return externalMembers; } return null; string cubeName = "FinancialDetail"; string entityMemFilter = "E#1001"; string consName = "Local"; int scenarioTypeId = 1;//ScenarioTypeID.Actual; string scenarioMemFilter = "S#Actual"; string timeMemFilter = "T#2024M6"; string viewName = "YTD"; string filter = "UD7=‘None’"; bool suppressNoData = true; int parallelQueryCount = 1; bool logStatistics = false; DataTable dt = BRApi.Import.Data.FdxExecuteDataUnit(si, cubeName, entityMemFilter, consName, scenarioTypeId, scenarioMemFilter, timeMemFilter, viewName, suppressNoData, filter, parallelQueryCount, logStatistics); } catch (Exception ex) { throw ErrorHandler.LogWrite(si, new XFException(si, ex)); } } public void ExportDataTableToFile(DataTable datatable, string delimited, string file) { StreamWriter str = new StreamWriter(file, false, System.Text.Encoding.Default); // Export columns string Columns = string.Empty; foreach (DataColumn column in datatable.Columns) { Columns += column.ColumnName + delimited; } str.WriteLine(Columns.Remove(Columns.Length - 1, 1)); // Export rows foreach (DataRow datarow in datatable.Rows) { string row = string.Empty; foreach (object items in datarow.ItemArray) { row += items.ToString() + delimited; } str.WriteLine(row.Remove(row.Length - 1, 1)); } str.Flush(); str.Close(); } // Create Sample Data private DataTable CreateSampleData() { // Create a DataTable DataTable employeeData = new DataTable("EmployeeData"); DataColumn dtColumn; DataRow dtRow; // Create Name column. dtColumn = new DataColumn(); dtColumn.DataType = Type.GetType("System.String"); dtColumn.ColumnName = "Name"; dtColumn.Caption = "Name"; employeeData.Columns.Add(dtColumn); // Create EmpID column. dtColumn = new DataColumn(); dtColumn.DataType = Type.GetType("System.String"); dtColumn.ColumnName = "EmpID"; dtColumn.Caption = "EmpID"; employeeData.Columns.Add(dtColumn); // Create Address column. dtColumn = new DataColumn(); dtColumn.DataType = Type.GetType("System.String"); dtColumn.ColumnName = "Address"; dtColumn.Caption = "Address"; employeeData.Columns.Add(dtColumn); // Add new row dtRow = employeeData.NewRow(); dtRow["Name"] = "Employee 1"; dtRow["EmpID"] = "EmpID-1"; dtRow["Address"] = "Bangalore, India"; employeeData.Rows.Add(dtRow); // Add new row dtRow = employeeData.NewRow(); dtRow["Name"] = "Employee 2"; dtRow["EmpID"] = "EmpID-2"; dtRow["Address"] = "Bangalore, India"; employeeData.Rows.Add(dtRow); // Add new row dtRow = employeeData.NewRow(); dtRow["Name"] = "Employee 3"; dtRow["EmpID"] = "EmpID-3"; dtRow["Address"] = "Bangalore, India"; employeeData.Rows.Add(dtRow); return employeeData; } } } Thank you so much for any assistance. I always seem to find answers to a lot of my questions here. DeniseSolveddenisefockler8 days agoNew Contributor III41Views0likes3CommentsHow to save the outputs of ExportCubeViewGridsToExcelFile() to a .xlsx file?
I've tried to implement this function as per the Business Rules Editor snippet: Dim objByte() As Byte() = BRApi.CubeViews.Process.ExportCubeViewGridsToExcelFile(si, custSubstVarsForAllCubeViews, cubeViewNamesAndVars) However, I've had a few problems with this, the main one being that I've been unable to save whatever it returns to an Excel file. Here's what I've tried: Dim fileName As String = "test.xlsx" Dim filePath As String = $"Documents/Users/{StringHelper.RemoveSystemCharacters(si.UserName,False,False)}" Dim XFfileDataInfo As New XFFileInfo(FileSystemLocation.ApplicationDatabase,fileName,filePath) Dim XFfileData As New XFFile(XFfileDataInfo, String.Empty, objByte) BRApi.FileSystem.InsertOrUpdateFile(si, XFfileData) Whenever I run this code the output file is an XML. How do I save this to a .xlsx file?Solvedmireles8 days agoNew Contributor II27Views0likes5CommentsSetDataCellsUsingMemberScript does not write all list items
Hello All, SetDataCellsUsingMemberScript() seems to only write the last value added to list. I am successfully adding 14 records to the objMemberScriptValues list (I can loop through them and see the 14 unique intersections) but only the last one is being updated in the cube. I'm looping through the records in a datatable and then each intersection is added to the list: '*********************************************** For Each row As DataRow In dt.Rows strProfileName = row.Item("ProfileName").ToString strCube = row.Item("Cube").ToString strEtT = row.Item("EtT").ToString strCnT = row.Item("CnT").ToString strSnT = row.Item("SnT").ToString strTmT = row.Item("TmT").ToString strVwT = row.Item("VwT").ToString strAcT = row.Item("AcT").ToString strFwT = row.Item("FwT").ToString strOgT = "Forms" strIcT = row.Item("IcT").ToString strU1T = row.Item("U1T").ToString strU2T = row.Item("U2T").ToString strU3T = row.Item("U3T").ToString strU4T = row.Item("U4T").ToString strU5T = row.Item("U5T").ToString strU6T = row.Item("U6T").ToString strU7T = row.Item("U7T").ToString strU8T = row.Item("U8T").ToString dAmount = row.Item("Am") Dim objMemberScriptValue As New MemberScriptAndValue Dim objMemberScriptValues As New List(Of MemberScriptAndValue) Dim strMemberScript As String strMemberScript = "Cb#" & strCube & ":E#" & strEtT & ":C#" & strCnT & ":S#" & strSnT & _ ":T#" & strTmT & ":V#" & strVwT & ":A#" & strAcT & ":F#" & strFwT & _ ":O#" & strOgT & ":I#" & strIcT & ":U1#" & strU1T & ":U2#" & strU2T & _ ":U3#" & strU3T & ":U4#" & strU4T & ":U5#" & strU5T & ":U6#" & strU6T & ":U7#" & strU7T & ":U8#" & strU8T objMemberScriptValue.Amount = dAmount objMemberScriptValue.IsNoData = False objMemberScriptValue.Script = strMemberScript objMemberScriptValues.Add(objMemberScriptValue) Next Dim objXFResult As XFResult If objMemberScriptValues.Count > 0 Then objXFResult = BRApi.Finance.Data.SetDataCellsUsingMemberScript(si, objMemberScriptValues) If Not objXFResult.BoolValue Then Throw ErrorHandler.LogWrite(si, New XFException(si, objXFResult.Message, String.Empty)) End If End If '*********************************************** When I place the objFXResult code block within the For/Next loop it will successfully update each record one by one as they are added to the objMemberScriptValues list, but as it is written above where I'm adding each record to the list and then executing the objXFResult code block outside the For/Next loop, only the last record added to the list is written to the cube, even though the count of items in the list shows that the list contains all 14 records. Does anyone know what I may be doing incorrectly here? Can the list only contain one list item to be updated one at a time?Solvedkchampion9 days agoNew Contributor III41Views0likes4CommentsCalculated data disappeared after importing zip file with XMLs
Hi everyone, In my environment, I had some calculated data in 2023Q4. 2023Q4 was completely locked and certified. After that, I loaded a zipfile, containing XMLs consisting of Cube Views, Data Management Steps, Extensibility Rules, Metadata and some dashboards. I uploaded this to update an existing partnerplace solution running in my application. After loading the zip file, the calculated data from 2023Q4 was gone. After recalculating, the data was back, so no issue. However, I'm very confused on how the load of a zip file containing XMLs could have affected calculated data in a locked period. Thanks for any help or information. Kind regards, FlorisFlorisvdPoel9 days agoContributor21Views0likes0Comments