Vary 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 Function45Views0likes3CommentsRetrieve 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?14Views0likes1Comment- 17Views0likes0Comments
Dynamic 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 issueSolved14Views0likes1CommentReal-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!7Views0likes0CommentsFilterMembers syntax (: vs ,) and base clearing when using GetDataBufferUsingFormula
I’m working on a custom clear process that clears cube data using GetDataBufferUsingFormula() The goal is to dynamically clear data for all base members under the current POV (Entity, UD1-UD4) by expanding any parent members with the .Base suffix. In other words, I want to make sure every dimension in the POV (Entity and UDs alike) is ultimately resolved down to base members before the clear runs. Here’s a simplified idea of what I’m doing: Dim filterString As String = String.Join(":", intersectionParts) Dim fullFilter As String = $"FilterMembers({filterString})" Dim sourceBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula(fullFilter, DataApiScriptMethodType.Calculate, False, destinationInfo) The process builds a FilterMembers() expression dynamically, retrieves the buffer, and sets all cell amounts to zero to perform a clear. However, I’m facing two issues: Some child members aren’t being cleared, even when I use .Base on their parent. I’m not fully sure about the correct syntax for FilterMembers, should the dimensions be separated by colon (:) or by comma (,)? What’s the real difference between the two, especially when dealing with multiple parent members or nested intersections? For example, if I have three parent members in my intersection, I might build something like: FilterMembers(E#MyEntity.Base:U1#ProfitCenter.Base:U2#Location.Base) But it’s unclear whether that colon syntax is correct, or if it should be comma-separated, or another thing is, the use of square bracket...since some base-level data doesn’t seem to clear. Could this be a syntax issue with FilterMembers, or could the problem come from how I’m constructing or passing the intersection into GetDataBufferUsingFormula()? Any clarification or working example for multi-parent .Base expansions with FilterMembers() would be a huge help. Thanks in advance!40Views0likes2CommentsCreate 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?48Views0likes3CommentsGetting WF Profile Status in BR and using it in Cube View
Hello, is there a BR function where I can get a Workflow Status (example "Pre-Process Completed, Locked")? When I am using brapi.Workflow.Status.GetWorkflowStatus I only get UniqueId and Name. I want to use the status in a Cube View to display for users. Thank you!Solved521Views0likes4CommentsHow to get the sum of multiple entities in a GetDataCell or in a Calculate
Hi Everyone. I want to get the sum of multiple entities, like in the example below, but for now I'm only getting errors or values with 0 'First option Dim strList As String = String.Join(", ", (From l In lstMI Select "" & l.Member.Name & "").ToArray()) Dim lstMI As List(Of MemberInfo) = BRapi.Finance.Members.GetMembersUsingFilter(si, api.Pov.EntityDim.DimPk, "E#Kazakhstan.Base.Where(Text1 = 'M_S_KAZAKHSTAN')", True) api.Data.GetDataCell("A#411000:E#Root.list([" & strList &"]):C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS").CellAmount 'Second Option api.Data.GetDataCell("A#411000:E#Kazakhstan.Base.Where(Text1 = 'M_S_KAZAKHSTAN'):C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS").CellAmount What I ultimately want to do is to get those values so I can change the following, so that the entity includes all those base entities that meet the filter, and I can get the correct value and use it in my Calculate. Dim DBICtry As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(A#RETBUYBACK:E#" & strEntTx3 & ":C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS + A#423100:E#" & strEntTx3 & ":C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS + A#411000:E#" & strEntTx3 & ":C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS)") api.Data.FormulaVariables.SetDataBufferVariable("DBICtry",DBICtry,False) api.Data.Calculate("A#P_EBIPrct:O#Import:U1#D0000:U2#P0000:U3#LOCAL_DATA:U4#PJ00000 = Divide($DBICtry, A#411000:E#" & strEntTx3 & ":C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS)") Thanks for your help and I appreciate the help.145Views0likes4Comments