Recent Discussions
Issue Loading multiple CSV files into custom table using LoadCustomTableUsingDelimitedFile
Hello Fellow OneStream team - I have multiple csv file in a file share folder, using BRApi.Utilities.LoadCustomTableUsingDelimitedFile to do the job, but it's loading only single csv file into the custom table. Below is extender BR , not sure what am I missing in the For loop, guidance is appreciated. Namespace OneStream.BusinessRule.Extender.Load_Table_Data Public Class MainClass Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As ExtenderArgs) As Object Try Select Case args.FunctionType Case Is = ExtenderFunctionType.Unknown 'Select Load options Dim loadMethod As String = "Replace" '<-- Select file load method (Replace, Merge) Dim dbLocation As String = "App" '<-- Specify db type Dim tableName As String = "XFC_OStoSF_BudgetData" '<-- Specify table name to load Dim blnSkipHeader As Boolean = True '<-- Specify if the first row should be skipped (True/False) Dim configSettings As AppServerConfigSettings = AppServerConfig.GetSettings(si) 'Note: file path must be accessible from all application servers Dim xfolderPath As String = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp(si,True, configsettings.fileShareRootFolder,si.AppToken.AppName) & "\20251014" ' Dim filesToLoad As String = "*_CubeData.csv" Dim fileList = System.IO.Directory.GetFiles(xfolderPath, filesToLoad) ' 'Get list of files to copy For Each file As String In fileList 'Get the file name Dim fileName As String = file.Substring(xfolderPath.Length + 1) BRApi.ErrorLog.LogMessage(si, "FileName:" & fileName) ' Dim fileList = System.IO.Directory.GetFiles() For Each fName As String In fileName 'Define columns that are in the table (this must match the fields in the deminted file) 'Update the fields with the column names/types to match the table being loaded Dim fieldTokens As New List(Of String) fieldTokens.Add("xfText#:[Cube]") fieldTokens.Add("xfText#:[Entity]::NewGuid") fieldTokens.Add("xfText#:[Parent]") fieldTokens.Add("xfText#:[Cons]") fieldTokens.Add("xfText#:[Scenario]") fieldTokens.Add("xfText#:[Time]") fieldTokens.Add("xfText#:[View]") fieldTokens.Add("xfText#:[Account]") fieldTokens.Add("xfText#:[Flow]") fieldTokens.Add("xfText#:[Origin]") fieldTokens.Add("xfText#:[IC]") fieldTokens.Add("xfText#:[UD1]") fieldTokens.Add("xfText#:[UD2]") fieldTokens.Add("xfText#:[UD3]") fieldTokens.Add("xfText#:[UD4]") fieldTokens.Add("xfText#:[UD5]") fieldTokens.Add("xfText#:[UD6]") fieldTokens.Add("xfText#:[UD7]") fieldTokens.Add("xfText#:[UD8]") fieldTokens.Add("xfDec#:[Amount]") fieldTokens.Add("xfText#:[HasData]") fieldTokens.Add("xfText#:[Annotation]") fieldTokens.Add("xfText#:[Assumptions]") fieldTokens.Add("xfText#:[AuditComment]") fieldTokens.Add("xfText#:[Footnote]") fieldTokens.Add("xfText#:[VarianceExplanation]") 'Execute file load ' BRApi.Utilities.LoadCustomTableUsingDelimitedFile(si, SourceDataOriginTypes.FromFileShare, filePath & fileName, Nothing, ",", dbLocation, tableName, loadMethod, fieldTokens, blnSkipHeader) BRApi.Utilities.LoadCustomTableUsingDelimitedFile(si, SourceDataOriginTypes.FromFileShare, xfolderPath & "\" & fileName , Nothing, ",", dbLocation, tableName, loadMethod, fieldTokens, blnSkipHeader) Next Next End Select Return Nothing Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function End Class End Namespacefellow_Ones8 hours agoNew Contributor III6Views0likes0Comments- pranav4614 days agoContributor III18Views0likes0Comments
Real-time "Unsaved" status, Intercepting Workflow Navigation
I have a requirement to implement data integrity guardrails on several budgeting forms (Dashboards containing Cube Views/SQL Table Editor). I am looking for guidance on whether the following two features are technically feasible within OneStream: 1. Real-Time "Unsaved Changes" Indicator The goal is to display a status label at the top of the Dashboard that updates to "Data Hasn't Been Saved" the moment a user modifies a cell value (Cubeview/SQL Table Editor), before they actually click the Save button. Question: Is there a way to detect a "dirty" cell state or user input in real-time to update a dashboard component immediately, or are we limited to updating status only after a Save action is triggered? 2. Navigation Warning (Popup on Exit) The goal is to trigger a popup warning if a user attempts to navigate away from the current Workflow Unit or close the Dashboard tab without having Saved or Run Calculations. Question: Is there an event handler available that allows us to intercept a navigation event, and potentially block the user from leaving the screen until they complete the required actions? If anyone has implemented a similar solution or knows which Business Rule events controls these interactions, I would appreciate the insight. Thanks!saifsafwan22 days agoNew Contributor9Views0likes0CommentsUpdate bound parameter value without refreshing dashboard
Hi, I have a tree view component with this bound parameter: When an item in the Tree is selected, I want the parameter "userSelection" to update accordingly, for this reason I've set it to refresh once an item is selected. The problem is that all the parent items the user opened to get to the selected item get closed once the dashboard gets refreshed, but I can't find a way to update "userSelection" without refreshing. The only workaround I found is to save the parameter value into a variable, but it can be only accessed by components since I'm in a component service (I'm using assemblies). So, do you know any way to save the value into "userSelection" parameter without refreshing? (I've already tried using SelectionChangedTaskInfo but it doesn't work) Thank you.Caccia2 months agoNew Contributor II4Views0likes0Commentstask manager comments - how to notify users by email
Hello, We are implementing the task manager and one of the requests is for the users to be able to know when comment is added. Is there a way to build business rules so email is sent when comment in TM is added. If someone already has it would you be willing to share it? thank you, OlaOlaWidera2 months agoNew Contributor II20Views0likes0CommentsTransformationEventHandler - Adding new member to main and Alternate hierarchy
Is it possible to add members to both main and alternate hierarchies using EventHandler from source. Was not able to achieve using existing code. Below code is being used to add new members from source to the Flow dimension which works for main hierarchy but not adding under Alternate hierarchy, any help is appreciated. The new member needs to get added under both parents below Dim flowDimName As String = "Product_Attributes" Dim flowMF As String = "F#TopProductAttributes.Base" Dim flowLookup As Dictionary(Of String, MemberInfo) = Me.CreateMemberLookupUsingFilter(si, flowDimName, flowMF) Dim ExistflowLookup As List(Of MemberInfo) = BRApi.Finance.Metadata.GetMembersUsingFilter(si, flowDimName, flowMF, True) Dim flowAddedMembers As New Dictionary (Of String, String) 'Set the parent to add new FLOW Members under Dim tFlowColIndex As Integer = (objTransformer.TransformerDimensions(StageConstants.MasterDimensionNames.Flow).DataTableColumnIndex) + StageConstants.TransformationColumnIncrements.Target '****************Start adding new members********************************************* 'Loop over all pages in the cache If objTransformer.DataCache.Pages.Count > 0 Then 'Move to the first page objTransformer.DataCache.MoveFirstPage(si) 'BRAPI.ErrorLog.LogMessage(si,"Add member Yes: Line 223") 'Process All pages in the data cache For intPageNo As Integer = 0 To objTransformer.DataCache.Pages.Count - 1 'Set the current data page objTransformer.DataCache.ActivatePage(si, intPageNo) 'Process each row in the data table on this page for each dimension we are checking For Each row As DataRow In objTransformer.DataCache.CurrentPage.PageDataTable.Rows ' BRApi.ErrorLog.LogMessage(si, "Line 123") 'Check the target Flow Value Dim targetFlow As String = row(tFlowColIndex) Dim flowDesc As String = "" '*** Product Attribute Description *** Dim flowMember As String = row(tFlowColIndex) 'Determine Flow Parent member Dim flowParent As String = "NA_RELEASE_STATUS" 'Determine Flow Parent member Dim flowParent As String = "NA_RELEASE_STATUS" If (Not row(tFlowColIndex) Is Nothing) Then If flowMember.XFContainsIgnoreCase("NOT_RELEASED~AUTOMOTIVE") Or flowMember.XFContainsIgnoreCase("NOTRELEASED~AUTOMOTIVE") Then flowParent = "NOT_RELEASED" ElseIF flowMember.XFContainsIgnoreCase("NOT_RELEASED~AUTOMOTIVE") Or flowMember.XFContainsIgnoreCase("NOT_RELEASED~AUTOMOTIVE") Then flowParent = "AUTOMOTIVE" End If End Iffellow_Ones3 months agoNew Contributor III37Views0likes0CommentsUse Data Adapter in a Different Workspace
I'm looking copy an existing data adapter (screenshot below) from the RCM solution into a different workspace and use it within BI Viewer for custom dashboards. I believe the 'GetReconsWithStatusGridView' function is stored within the 'Services' assembly folder and 'ReconService.cs' is the file within the folder that needs called. I have 'Is Shareable Workspace' set to True. Since the method query references WSMU, I need to update that in order to properly call the underlying business rule. That's the part I'm having trouble with. I've tried a wide variety of syntax to no avail. Examples: {Workspace.OFC.RCM}{GetReconsWithStatusGridView}{AccountFilter=...} {Workspace.OFC.RCM.Services}{GetReconsWithStatusGridView}{AccountFilter=...} {Workspace.OFC.RCM.Services.ReconService}{GetReconsWithStatusGridView}{AccountFilter=...} Does anyone know the proper syntax to place in my copied data adapter? Are there any other steps I need to take to properly reference this business rule? Thanks!aricgresko3 months agoContributor III53Views0likes0CommentsShow Plug Account property for an Account on UD
The below code returns the Plug Account name for an Account, taken from the Plug Account property on the Account It is a DynamicCalc on UD8. Set up a U8 member, f.ex. "YourName" Api.Account.GetPlugAccount returns a long string that contains the Plug Account Name For each Account that has a Plug Account, the string will contain "DimId: 22", so this can be used as filter. The Plug Account name will be stated directly after "Name: ", so this can be extracted from the string. In the below example, "NA" is returned where there is no Plug Account. The Plug Account Name will be shown when using V#Annotation:U8#YourName on Accounts ---------------------------------------------- Dim AccPlugAccName As String = "" ' Fetch the Plug Account property Dim fetchedValue As String = Api.Account.GetPlugAccount(Api.Pov.Account.MemberId)?.ToString() ' Check if the fetched string is not null/empty and contains "DimId: 22" If Not String.IsNullOrEmpty(fetchedValue) AndAlso fetchedValue.Contains("DimId: 22") Then ' Extract only the value after "Name: " and before the next comma Dim startIndex As Integer = fetchedValue.IndexOf("Name: ") + "Name: ".Length Dim endIndex As Integer = fetchedValue.IndexOf(",", startIndex) AccPlugAccName = fetchedValue.Substring(startIndex, endIndex - startIndex).Trim() Else ' Assign "NA" if the condition is not met AccPlugAccName = "NA" End If ' Return the result Return AccPlugAccNameDJ3 months agoNew Contributor32Views0likes0CommentsCAT_executeCopy rule
Hi, In our application, we uninstalled and re-installed Cloud Administration Tool, after did this trying to compile CAT_executeCopy while doing this getting validation errors. My concern is after uninstall CAT, is it mandatory clear CAT_executeCopy rule as well?uvrao335 months agoNew Contributor III33Views0likes0Comments