Transformation Rule - Split - Complex Expression
I need to get, from a Custom Dimension, the characters starting after "D." or "T." when it's possible. Normally it comes as D. or T. at the beginning, followed by XYZ. What I want to get, as a direct mapping, is XYZ (these are the members created in the Custom Dimension in OneStream). What type of mapping can I use for this? I don’t want to trim the source member in the Data Source because I need the full original source member to appear in Stage.Solved20Views0likes3CommentsVary description vy user culture in XFBR
Hello, We are facing the following issue, we use the following xfbr to generate accounts in a cubeview rows and retrieve descriptions : XFBR(CCF_XFBR, GetCCFDrillDownWithDescription2,memberExp=[A#CashFlow_Gestion.TreeDescendantsInclusive], Time=|CVTime|). However, the Cube View where this XFBR is applied always displays the descriptions in the default format. The description does not adapt based on the user’s culture settings. How can we make the XFBR return descriptions that vary according to the user culture? For reference, here is the XFBR code : Public Function GetCCFDrillDownWithDescription2(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As String Try 'Get the Dim PK for Entity Dimension Dim accountDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si,args.SubstVarSourceInfo.WFAccountDim) Dim flowDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si,args.SubstVarSourceInfo.WFFlowDim) 'Dim memberListClass As New OneStream.BusinessRule.Finance.CCF_FinanceLogics.MainClass Dim memFilterAccounts As List(Of MemberInfo) = BRAPi.Finance.Members.GetMembersUsingFilter(si, accountDimPk, args.NameValuePairs("memberExp"), True) If memFilterAccounts.Count = 0 Then ' brapi.ErrorLog.LogMessage(si,"Cash flow Account Member Not found in CubeView member filter. Check XFBR syntax (GetCCFDrillDown) in Cube view") Return "A#None:F#None:Name(Please check memberfilter in cubeview. Cashflow Account not found)" End If 'Use a text builder to build a string Dim resultString As New Text.Stringbuilder() Dim isfirstItem As Boolean = True ' Dim accountFlowComb As String ' Dim flowBaseMembers As List(Of Member) Dim objDataCellInfoUsingMemberScript As New DataCellInfoUsingMemberScript Dim tftEntityID As Integer = Brapi.Finance.Members.GetMemberId(si,dimTypeId.Entity, "CF") Dim objScenarioType As ScenarioType = BRApi.Finance.Scenario.GetScenarioType(si, args.SubstVarSourceInfo.WFScenario.MemberId) Dim timeReference As String = BRApi.Finance.Entity.Text(si, tftEntityID, 1, objScenarioType.Id, args.SubstVarSourceInfo.WFTime.MemberId) Dim MatrixTime As String = args.NameValuePairs("Time") Dim scenarioReference As String = BRApi.Finance.Entity.Text(si, tftEntityID, 2, objScenarioType.Id, args.SubstVarSourceInfo.WFTime.MemberId) If scenarioReference = String.Empty Then scenarioReference = args.SubstVarSourceInfo.WFScenario.Name Dim cashFlowSettings As DataTable = BRApi.Import.Data.FdxExecuteDataUnit(si, "PARAM_CF", "E#CF", "Local", objScenarioType.Id,"S#" & scenarioReference, "T#" & MatrixTime, "YTD", True, "Amount <> 0", 4, False) 'Dim cashFlowAdj As DataTable = BRApi.Import.Data.FdxExecuteDataUnit(si, "CONSO", "E#CF", "Local", objScenarioType.Id,"S#REEL","T#" & timeReference , "YTD", True, "Amount <> 0", 4, False) 'Exit Function Dim CFSiN As Boolean = cashFlowSettings Is Nothing If cashFlowSettings Is Nothing Then Brapi.ErrorLog.LogMessage(si,"No CashFlow setting found") Return "" 'Exit Function ElseIf cashFlowSettings.Rows.Count = 0 Then Brapi.ErrorLog.LogMessage(si,"No CashFlow setting found") Return "" 'Exit Function End If Dim space As String = String.Empty Dim sign As String = String.Empty Dim AccountDescription As String ' Dim AccountDescription2 As String For Each account As MemberInfo In memFilterAccounts ' brapi.ErrorLog.LogMessage(si,"account " & account.NameAndDescription) space = " " For i = 0 To account.IndentLevel space = space & " " Next 'Exit Function resultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None,") 'resultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None:U7#MT_RETTFT,") ' Cb#CONSO:E#EIMER:P#?:C#Local:S#REEL:T#2022M12:V#YTD:A#RD_T110:F#None:O#Top:I#Top:U1#None:U2#None:U3#Top:U4#None:U5#None:U6#None:U7#MT_RETTFT:U8#CF_CalcAmount 'Ajout des ecritures Dim memberFilter As String = "MT_RETTFT" Dim UD7Desc As String = BRApi.Finance.Metadata.GetMember(si, dimTypeId.UD7,memberFilter).Description 'ResultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None:U7#MT_RETTFT:Name(" & UD7Desc & "),") If Not BRApi.Finance.Members.HasChildren(si, accountDimPk, account.Member.MemberId) Then Dim cashFlowSettingRows() As DataRow = cashFlowSettings.Select("UD7 = '" & account.Member.Name & "' AND UD8 = 'None'") For Each row As DataRow In cashFlowSettingRows AccountDescription = BRApi.Finance.Metadata.GetMember(si, dimTypeId.Account,row("Account")).NameAndDescription If row("Amount") = -1 Then sign = "(-)" 'ResultString.Append("A#" & row("Account") & ":Name( "& space & " " & AccountDescription & "):F#" & row("Flow") & ":U7#" & account.Member.Name &",") 'ResultString.Append("A#" & row("Account") & ":Name( "& space & " " & AccountDescription & "):F#" & row("Flow") & ":U7#" & row("UD7") &",") ResultString.Append("A#" & row("Account") & ":Name( "& sign & space & AccountDescription & "):F#" & row("Flow") & ":U7#" & row("UD7") &",") Next ResultString.Append("A#" & account.Member.Name & ":Name( " & space & account.Member.Name & space & UD7Desc & "):F#None:U7#MT_RETTFT:U8#None" &",") 'ResultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None:U7#MT_RETTFT:Name(" & UD7Desc & "),") End If Next Return resultString.ToString Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function49Views0likes3CommentsRetrieve the culture in a BR and display the name & description of this culture
Hello everyone, We currently have a business rule that allows us to display a certain number of accounts for our cash flow cube view. The problem is that when returning account.Member.NameAndDescription, it does not take into account the user's culture. resultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None,") So I think I need to retrieve the culture of the user displaying the cube view in my BR in order to return the correct name and description. However, I don't know how to retrieve the user's culture, nor what parameter to return instead of account.Member.NameAndDescription to get the one in US English, as the default is in French. Do you have any ideas?22Views0likes1CommentDynamic calc
Dynamic calc formula for an account Dim RATE As DataCell = api.Data.GetDataCell("A#RATE:F#99:U7#Top") Dim CALC As DataCell = api.Data.GetDataCell("A#CALC:F#F99:U7#Top") If api.Pov.Entity.Name <> "None" And api.Entity.HasChildren() Then If RATE.CellAmount < 0.15 api.Data.Calculate("RATE = 0.15 * RemoveZeros(CALC)") Return RATE Else Return 0 End If End If i'm calling A#RATE from the cube view. i have error unable to execute the formula for member RATE, error in processing script. when i compile the formula no issueSolved14Views0likes1CommentMore Filters in FdxExecuteDataUnit
Hello, I'm building Dashboard Data Set business rule to retrieve data from cubes. Besides the member filters in FdxExecuteDataUnit parameters, I'd like to add some additional filters, like account dimension filters, UD1,/UD2/UD4 dimension filters. And filters could include plenty of values. How can I make it work? I try to defined it in below manner, but the result is not filtered as expected. Dim additionalFilter As String = "Account = 'EBIT' OR ACCOUNT = 'CAPEX'" 'Execute FDX query dt = BRApi.Import.Data.FdxExecuteDataUnit( si, "Total_Magna", ' Cube name "E#Parent1,E#Parent2", "C#USD", ScenarioTypeId.Actual, "S#Actual", "T#2025M1", "V#Periodic", True, additionalFilter, 100000, False )Solved52Views0likes9CommentsCreate a parameter to determine the initialization status of each forecast?
Hello everyone, We have set up a monthly forecast that is compared to the budget or actual figures in different cube views. We currently use a parameter to select the forecast month in each cube view, but I would like to remove it and have the latest forecast for the year or year N-1 displayed automatically. I have created an XFBR that retrieves the holding company's turnover for each of the 11 forecasts (January, February, etc., November) and displays the forecast closest to December with a turnover. The problem is that not all users have access to this company, so the BR does not work for them. I could change the BR to add companies to it so that it works for all users, but I find that cumbersome. Is it possible to save a value (X or 1) in a variable when initializing the forecast so that the BR can query this variable based on the Time scenario and thus know which forecast has been initialized? How do you do this in your OS?48Views0likes3CommentsC# - is it now widely used for BRs?
1) Is C# now widely used for Business Rules? 2) Is there any plan to support C# in member formulas? 3) For those who moved their business rules from vb.net to C# - why you did it and what benefits you get out of it? 4) In OneStream - is there anything that one can do in vb.net but can't in C#? If so, what are they? Thanks in advance for sharing your experience.Solved157Views0likes5CommentsUnable to set the CreditAmount in JournalLineItem for journals created with Business Rule
I can't seem to figure out why the CreditAmount in the JournalLineItem isn't reflecting the number that I assign to it. It's always zero no matter what. Is anyone experiencing this issue? see my code below. Sub CreateJournal(ByVal si As SessionInfo) Try 'Set up a new journal header. Dim journalObjectHeader As New JournalHeader() With journalObjectHeader .Name = "Test_Journal" .Description = "This is a test journal" .WorkflowProfileID = si.WorkflowClusterPk.ProfileKey .MemberIds.Scenario = si.WorkflowClusterPk.ScenarioKey .MemberIds.Time = si.WorkflowClusterPk.TimeKey .JournalStatus = JournalStatus.Working .IsSingleEntity = False End With Dim journalObjectLineItems As New List(Of JournalLineItem) 'Create the first journal line item Dim jnLineItem1 As New JournalLineItem With jnLineItem1 .EntityId = BRApi.Finance.Members.GetMemberId(si, DimType.Entity.Id, "100_US") .AccountId = BRApi.Finance.Members.GetMemberId(si, DimType.Account.Id, "10220030") .FlowId = BRApi.Finance.Members.GetMemberId(si,DimType.Flow.Id, "EndBal") .ICId= BRApi.Finance.Members.GetMemberId(si, DimType.IC.Id, "None") .DebitAmount.Amount = 150 End With journalObjectLineItems.Add(jnLineItem1) 'Create the 2nd journal line item Dim jnLineItem2 As New JournalLineItem With jnLineItem2 .EntityId = BRApi.Finance.Members.GetMemberId(si, DimType.Entity.Id, "100_US") .AccountId = BRApi.Finance.Members.GetMemberId(si, DimType.Account.Id, "10220050") .FlowId = BRApi.Finance.Members.GetMemberId(si,DimType.Flow.Id, "EndBal") .ICId= BRApi.Finance.Members.GetMemberId(si, DimType.IC.Id, "None") .CreditAmount.Amount = - 150 End With journalObjectLineItems.Add(jnLineItem2) 'Create a new journal object Dim journalObject As New Journal(journalObjectHeader, journalObjectLineItems) 'Save it BRApi.Journals.Metadata.SaveJournalOrTemplateUsingIds(si, journalObject,False, True) Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End SubSolved33Views0likes1CommentUse 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!53Views0likes0CommentsBusiness Rule to Remove Base-Level Entities from a Parent Rollup Based on Keyword Match
Hi everyone, I'm working on a Business Rule in OneStream and could use some guidance. I’m trying to build a rule that targets a user-defined parent rollup within the Entity Dimension. The goal is to automatically remove the relationship between that rollup and any base-level child entities whose name or description contains a specific keyword — in this case, "YS". Here’s what I’m aiming for: The rule should accept a parent rollup name (e.g., Global_excl_YS) It should loop through all children of that rollup If a child is a base member and its name or description includes "YS", the rule should "remove the relationship" Parent or intermediate rollups should remain untouched I’m planning to implement this as an Extensibility Business Rule, but I’d love to hear if anyone has done something similar or has tips on best practices for metadata manipulation in this context. Thanks in advance! ' Define dimension and parent rollup as parameters or hardcode here Dim EntityDimPK As DimPk = BRApi.Finance.Dim.GetDimPk(si, "MgmtEntity") Dim RollupName As String = "Global_excl_YS" Dim RollupMember As Member = BRApi.Finance.Members.GetMember(si, dimtype.Entity.Id, RollupName) ' Get all direct children of the rollup Dim Children As List(Of Member) = BRApi.Finance.Members.GetChildren(si, EntityDimPK, RollupMember.MemberId, Nothing) Dim RemovedEntities As New List(Of String) For Each ChildMember As Member In Children Dim ChildName As String = ChildMember.Name Dim ChildDesc As String = If(ChildMember.Description, "") ' Check if base (no children) Dim HasChildren As Boolean = BRApi.Finance.Members.HasChildren(si, EntityDimPK, ChildMember.MemberId, Nothing) If Not HasChildren Then ' Check if "YS" in name or description If ChildName.ToUpper().Contains("YS") Or ChildDesc.ToUpper().Contains("YS") Then ' Remove Relationship End If End If Next If RemovedEntities.Count = 0 Then Return "No base children with 'YS' found under " & RollupName Else Return "Removed from " & RollupName & ": " & String.Join(", ", RemovedEntities) End If50Views0likes1Comment