Recent Discussions
Quick OneStream Rule Behavior Check – O#Top Returning O#Import Value?
Hi Team, Quick question — has anyone else encountered this behavior in rule logic? I’m working with a standard api.Data.GetDataCell(...) call that includes the O#Top member in the POV. Here's the line I'm using: Dim baseValue As Decimal = api.Data.GetDataCell("C#Local:A#1104000000:F#CLO:O#Top:I#Top:U1#Top:U2#Top:U3#Top:U4#Top:U5#Top:U6#Top:U7#Top:U8#Top").CellAmount. BRApi.ErrorLog.LogMessage(si, baseValue) On the Cube View, this correctly returns -501 under O#Top. However, when I log the value in the rule using: - It outputs the value from O#Import, not the aggregated O#Top result I expected. This rule worked flawlessly for 3 years until now on Version 7.4. As a workaround, I manually aggregated the base origin members in the rule, which produced the expected result. However, I’m still unclear why O#Top didn’t aggregate properly in this case, given that it functions as expected in Cube Views. I checked and compared with several other apps, including Golfstream, in which this rule worked. Environment: This behavior was observed in 7.4. After upgrading to version 8.4, the issue was resolved. I’d like to understand what may have caused this inconsistency, particularly: Could a bug affect the Origin dimension, which was resolved in 8.4? Has anyone experienced this behavior before? Appreciate any insights or similar experiences the community can share!ChrisBriscoe3 hours agoNew Contributor II5Views0likes0CommentsPublic Overloads Function GetCalculatedFxRate... is obsolete
Is someone able to assist me with an alternative method for GetCalculatedFxRate on line 14 of the code below? We just upgraded to 8.5.1 and this is no longer being supported. In 8.2.3 it was still working. This is a parser business rule that is being applied to a data source and calculation happening when data is being imported. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 'Purpose: Get Translation rate for To/From currencies on current record. ' Store translation rate in global variable to use with subsequent records for performance improvements. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dim time As String = api.CurrentDataClusterKey.TimeName 'Get current time. Dim currencyRate As Decimal = globals.GetDecimalValue(fromCurrency & "-" & toCurrency & "-" & time) 'Check Global variable for current translation rate. If Not currencyRate = Nothing Then 'If Globals is populated, return rate from global variable. Return currencyRate Else 'Else, get translation rate from Database and store in Global variable. Dim rateType As FxRateType = BRApi.Finance.Scenario.GetFxRateTypeForRevenueExpense(si, api.CurrentDataClusterKey.ScenarioID) 'Get Revenue rate type for current scenario Dim defaultCurrencyId As Integer = BRApi.Finance.Cubes.GetDefaultCurrencyId(si, 0) 'Get Cube's default currency ID Dim objActFxRate As New FxRatePkUsingNames(rateType.ToString, time, fromCurrency, toCurrency) 'Get rate information for current translation. Dim rate As Decimal = BRApi.Finance.Data.GetCalculatedFxRate(si, defaultCurrencyID, objActFxRate) 'Get translation Amount Globals.SetDecimalValue(fromCurrency & "-" & toCurrency & "-" & time, rate) 'Store current translation amount in global variable. Return rate 'Return Translation Rate. End If Thank you, Denisedenisefockler6 hours agoNew Contributor III6Views0likes1CommentGetBaseMembers: How can I perform a getmembers on an entity as if it were in a cube view?
Hi Everyone. I wanted to see if there is a way to obtain the entities that are under another one but with a filter, like the following: E#|!PerformPnL_Entity!|.TreeDescendantsInclusive.Where(Text1 StartsWith M_ and (HasChildren = True)) I want to do this in a BR, but I am not sure exactly how to do it or if it is possible, since GetBaseMembers brings all of them and I would like to filter it first so that there are not too many entities to verify. I would appreciate it if you could help me with this question.Marco11 days agoContributor II24Views0likes1CommentHelp with Table Views
Hello, I'm attempting to create my first table view using the syntax below. The SQL is a very basic record grab from DataEntryAuditSource (initial POC). Compiles fine and seems to be okay relative to the user guide, but I keep getting an error message when I attempt to run. Does anyone have any thoughts on what I could be doing wrong? Thanks, Sean ----- Imports System Imports System.Collections.Generic Imports System.Data Imports System.Data.Common Imports System.Globalization Imports System.IO Imports System.Linq Imports Microsoft.VisualBasic Imports OneStream.Finance.Database Imports OneStream.Finance.Engine Imports OneStream.Shared.Common Imports OneStream.Shared.Database Imports OneStream.Shared.Engine Imports OneStream.Shared.Wcf Imports OneStream.Stage.Database Imports OneStream.Stage.Engine Namespace OneStream.BusinessRule.Spreadsheet.UTM_TaskList Public Class MainClass Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As SpreadsheetArgs) As Object Try Select Case args.FunctionType ' Case Is = SpreadsheetFunctionType.Unknown ' Case Is = SpreadsheetFunctionType.GetCustomSubstVarsInUse Case Is = SpreadsheetFunctionType.GetTableView If args.TableViewName.Equals("SeansFirstTableView") Return GetUTMTaskListExport(si) End If ' Case Is = SpreadsheetFunctionType.SaveTableView End Select Return Nothing Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function #Region "Get Table Views" Private Function GetUTMTaskListExport(ByVal si As SessionInfo) As TableView Try Dim SQL_TaskListExport_L As New Text.StringBuilder SQL_TaskListExport_L.AppendLine(" SELECT DataEntryAuditSource.UserID as ID, DataEntryAuditSource.TimeStamp as TimeStamp, DataEntryAuditSource.UniqueID as RecordID, DataEntryAuditSource.CubeVieworFileName as Format, DataEntryAuditSource.DataEntryType as Type, FROM DataEntryAuditSource ") 'Create and fill the DataTable Dim DT_TaskListExport_L As DataTable = Nothing Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si) dt_TaskListExport_L = BRApi.Database.ExecuteSql(dbConnApp, sql_TaskListExport_L.ToString, False) If Not dt_TaskListExport_L Is Nothing Then dt_TaskListExport_L.TableName = "NoData" End Using 'Create and Populate Table View Dim tv_TaskListExport As New TableView() tv_TaskListExport.PopulateFromDataTable(dt_TaskListExport_L, True, True) 'Table View Settings and Formatting tv_TaskListExport.CanModifyData = False tv_TaskListExport.HeaderFormat.BackgroundColor = XFColors.XFDarkBlueBackground tv_TaskListExport.HeaderFormat.TextColor = XFColors.White tv_TaskListExport.HeaderFormat.IsBold = True tv_TaskListExport.Columns.Item(1).ColumnFormat.ColumnWidth = 15 Return tv_TaskListExport Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function 'GetUTMTaskListExport #End Region End Class End NamespaceCAIGuySeanF14 days agoContributor47Views0likes3CommentsJournal Name Creation on Event Handler
Hi Has anyone created an event handler around the journal name creation? We have a requirement around enforcing the journal name to meet a specific criteria + be within a certain number of characters in length ThanksABott7314 days agoNew Contributor II25Views0likes2Commentsdetermining parent by hierarchy
tldr: What's a performant, reliable way to determine a member's parent within a given hierarchy? I have been developing a custom extender rule to automate OneStream metadata updates based on our master metadata source. One of the last remaining tasks to solve is how to correctly execute member moves. As OneStream can have a given member exist multiple times in the same dimension, the only way to execute a move in OneStream is by specifying "move from parent A to parent B." Parent B is quite easy to determine as our metadata source provides this information per-hierarchy and does not allow duplicates but it does not tell us parent A, or even if there was a move at all. This means I have to validate that the specified member 1) is under the same parent that our metadata source says it should be and 2) isn't anywhere else in the hierarchy. However, in OneStream, I know of no way to query the parent(s) of a member but only those within a specific hierarchy. I've never needed to do this in a BR before but I have definitely been stung by this limitation while working with QVs in the past. This makes it feel like a common-enough need that there's probably a way to do it that I'm just unaware of. If not, I'll have to code it myself and I could use some insight into a performant and logically-sound way to do it. So far, the only approach I can imagine is this: BR API GetDescendants to pull all members in a hierarchy. Verify the child exists in the hierarchy. BR API GetParents to pull all parents of the child. Iterate through each parent to see which one(s) exists in the hierarchy. If there's only one and it differs from the one provided by our metadata source, move it. If there are multiple, oh bother. However, I foresee a lot of unpleasant little surprises in developing this. I also worry about performance as there's a Cartesian product of the number of descendants times the number of parents. Even if it's speedy, it still seems like a very indirect route to take for what is conceptually simple. What's the better way to do this?photon14 days agoContributor100Views0likes17CommentsLookup Transformational rule UNDO
Hello. I have a set of Lookup Transformational rules. I have tried to load a mass upload for multiple lines of transformational rules through a trx file. I had a message saying the load has been completed with errors. However when I try to search for one rule I can't find it in the set of rules. When I try creating one of them manually it won't let me create it as it says it exists already, even though it doesn't show in the rule set. How can I undo what I did? How can I sort it out. A lot of people are depending of these rule set as it helps with Data extraction. Please support.IrinaDragusanu19 days agoNew Contributor III19Views0likes1CommentWhat is the best way to do Constant currency things in OneStream?
I am looking for different options to do Constant Currency.CPM_ONE19 days agoNew Contributor II27Views1like1Comment