Recent Discussions
BR Rule - BR api Error log
Hello All, OS experts - Greetings ! I am trying to complete the following code to extract the year and month from a given date. To help with validation and debugging, I've enabled BRAPI.ErrorLog.LogMessage to display the variable outputs in the error log. However, for some reason, it is not displaying any values in the error log. I would greatly appreciate any insights into what might be wrong with the code. Here is the code I am working with: Dim vDate As String = args.NameValuePairs.XFGetValue("Date") ' e.g., "01/01/2025" (MM/DD/YYYY format) ' Log the retrieved Date for debugging BRAPI.ErrorLog.LogMessage(si, "vDate: " & vDate) ' Ensure vDate is not null or empty before proceeding If Not String.IsNullOrEmpty(vDate) Then ' Extract the year (last 4 characters) from vDate and convert to an integer Dim vYear As Integer = CInt(vDate.Substring(6, 4)) BRAPI.ErrorLog.LogMessage(si, "vYear: " & vYear) ' Extract the month (first 2 characters) from vDate and convert to an integer Dim vMonth As Integer = CInt(vDate.Substring(0, 2)) BRAPI.ErrorLog.LogMessage(si, "vMonth: " & vMonth) Else BRAPI.ErrorLog.LogMessage(si, "vDate is null or empty!") End If Thank you in advance.KR201212 hours agoNew Contributor36Views0likes8CommentsBusiness Rules for new OS implementation
Hi, we are implementing OS at present, and this is our first-ever project in OneStream; I need guidance on Business Rules. I am not sure what business rules we need to consider after and before we import the data from the Client system to match the client's legacy system data with OneStream numbers. Thanks, Preeti37Views0likes2CommentsRetrieve Annotation Data and send to XFBR
Hi All, Let's say we have a table: Fruits (Annotation) Updated Fruit Value (annotation) Price of Fruit (input numerical value) apple banana $1.99 banana kiwi $2.99 strawberry melon $3.99 Let's say the fruits column is a UD dimension member and the Updated Fruit value contains a combo box in the cell where a user can update whatever value that shows in column 1. Meaning if in column 2 it says banana then the selection in that column overrides the apple (by override I mean that the price in the last column will map the numerical value to banana instead of apple for that intersection). Is there a way to retrieve annotation values on the backend and send to an XFBR (Ideally sending to an XFBR so I can assign that member to my pov for my Price of Fruit column)?PFowler2 days agoNew Contributor II19Views0likes1Commentperformance issue.
Hello OneStream Community, I am working with a Cube View where I need to display the Income Statement data for the end of every year (December). The data should show up as the beginning balance for the January month in the subsequent year. To achieve this, I used a Row Override1 member filter with the formula T#povprioryearm12. The Cube View includes four dimensions: Entity, Division, Cost Center, and Accounts. However, I am experiencing slow loading times when the view is being accessed. it is not exporting to Excel to validate. I would like to know if there are any best practices or strategies for improving the performance of the Cube View in this scenario. Are there specific optimizations I should consider for the member filter, the dimensions, or the Cube View configuration to reduce loading times? Any advice or recommendations would be greatly appreciated! Thank you in advance!18Views0likes1CommentMember Filter Functions in Finance BR
Is it possible to use Member Expansion functions like U1#[Top].Base.Where , U1#[Top].Base.Options within api.Data.GetDataBufferUsingFormula? I want to get data to the buffer from a Scenario / Scenario Type which is setup with a Summary UD1 dimension in the Cube Configuration.The data is loaded to this Scenario at Summary UD1 members. In the Spreadsheet I am able to pull the data using below member filter function. U1#[XX].Base.Options(cube = AA , ScenarioType = Operational) However when I apply the same function in the api.Data.GetDataBufferUsingFormula , I am getting errors stating need a comma after Options. If this function cannot be used within Finance BR is there another way to get the data from base members of Summary UD1 dimension? Dimension Summary UD1 Detail UD1 Members Summary UD1 Top CC001 Detail UD1 Top CC001 CC0011vmanojrc309 days agoContributor45Views0likes3CommentsData Quality Event Handler Rule
Hello, I recently had help modifying a rule so it would only run once for a multi year scenario, now I am having an issue trying to run the rule on other scenarios. How would I tell this rule to ignore the time condition for the budget scenario. The data management job set up on the workflow profile won't currently run due to line of code added: ' NEW CHECK TO ONLY RUN ON THE START YEAR OF WF RANGE TIME. If I remove it, then the calculation doesn't work for my forecast scenario properly. I basically somehow need to tell it to ignore that line for the budget scenario. Below is the full code. Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DataQualityEventHandlerArgs) As Object Try 'Define a switch to control event processing, since many of these are reference examples we do not want them to run all the time Dim processEvents As Boolean = False 'Set the default return values Dim returnValue As Object = args.DefaultReturnValue args.UseReturnValueFromBusinessRule = False args.Cancel = False 'Evaluate the operation type in order to determine which subroutine to process Select Case args.OperationName Case Is = BREventOperationType.DataQuality.ProcessCube.NoCalculate 'Execute a Data Management job after process cube runs Me.XFR_HandleProcessCubeNoCalculate(si, globals, api, args) 'Case Is = BREventOperationType.DataQuality.Certify.FinalizeSetCertifyState 'Send an email after a workflow profile executes its certification 'Me.XFR_HandleFinalizeSetCertifyState(si, globals, api, args) End Select Return returnValue Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function #Region "ProcessCube.NoCalculate Helpers" Private Sub XFR_HandleProcessCubeNoCalculate(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DataQualityEventHandlerArgs) '------------------------------------------------------------------------------------------------------------ 'Reference Code: XFR_HandleProcessCubeNoCalculate ' 'Description: Run a DataMgmt Sequence after the workflow process cube task is run. ' Note: the DataMgmt sequence name is assigned to a Workflow Profile CalcDef filter field ' so this event does not have to be modified, the user can simply edit the CalcDef grid ' for a workflow profile and this business rule will execucte the specified sequence. ' 'Usage: Used to supplement the standard "ProcessCube" functionality associated with a ' workflow profile by allowing a DataManagement sequence to be executed for the workflow profile ' as well. ' 'Created By: Tom Shea 'Date Created: 1-30-2013 '------------------------------------------------------------------------------------------------------------ Try 'Get the DataUnitInfo from the Event arguaments so that we can get the name of the DataManagement sequence to process. Dim calcInfo As DataUnitInfo = DirectCast(args.Inputs(2), DataUnitInfo) If Not calcInfo Is Nothing Then 'Make sure that a Sequence name as assigned to the filter value of the Calc Definition of the executing Workflow Profile If calcInfo.FilterValue <> String.Empty Then ' NEW CHECK TO ONLY RUN ON THE START YEAR OF WF RANGE TIME If timedimhelper.GetYearFromId(calcInfo.DataUnitIds.TimeId).Equals(timedimhelper.GetYearFromId(brapi.Finance.Scenario.GetWorkflowStartTime(si,calcInfo.DataUnitIds.ScenarioId))) 'Now, execute the DataMgmt Sequence that was specified in the FilterValue (In a background thread) BRApi.Utilities.ExecuteDataMgmtSequence(si, calcInfo.FilterValue, Nothing) End If End If End If Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Sub #End Region End Class End Namespace Any help would be greatly appreciated. Thank you!aorange9 days agoNew Contributor III23Views0likes1CommentPassing parameters from a user defined workspace to a DM process and Business Rule
When creating a dashboard in the default workspace you are able to pass dashboard parameter values to the data management sequence through the parameter section of the execution script: You can also use an Input Value parameter and create an extender process to populate the Input Value and then retrieve that value for a DM sequence or BR. However, when using user defined workspaces, I have only been able to successfully pass parameter values from a dashboard using a literal value (process on combo box executes a rule to populate a literal value with the most recent user selection, literal value is read by DM and BR processes). The issue with this literal value process is that the value is left at the value from the last execution of combo box selection so it requires the user to change the value to some other value, then reset the value to ensure the literal value has a valid stored value. Additionally, this process if being used by multiple users, may cause confusion if two users are changing combo boxes thus resetting literal values without knowing that the other users is changing the value. Is there no other way to reference user defined workspace parameter values like in the argument selections in the Server Task settings? I have seen some instances where the workspace ID can be referenced, however I don't see an examples of using some type of similar format for parameters (e.g. WorkspaceID.|!SomeParameter!|).bhenneuse11 days agoNew Contributor27Views0likes0CommentsBusiness Rules Implementation
Hi, I'm trying to learn more about the business Rules and what they are doing. Where can I find the various function implementations. For Example: I have this function Dim connectionString As String = GetConnectionString(si, globals, api) For the GetConnectionString function where is the code for this funciton ? so I can read and understand what its doing ? If this is in the API, I have been looking there today, can you reference which folder / document I can get this. Thanks for your help in advance.Tom12 days agoNew Contributor III57Views1like1CommentIsDurableCalculatedData
What is the default state of IsDurableCalculatedData if left out of an api.data.calculate statement? I'm assuming it's false but I just want to double check. I'm seeing an api.data.calculate statement which contains an "onEval" statement, then a comma, then False. If I look at Intellisense, the first field after the "onEval" is userState, followed by the Boolean for IsDurableCalculatedData. How should I read this statement? Is the False referring to the userState or to the IsDurableCalculatedData Boolean? Thanks, BobSolvedBobNelson12 days agoNew Contributor III22Views0likes3CommentsUse api.Data.Calculate to move data between 2 cubes
Is it possible to copy a value from one cube to another mutually exclusive cube with a Custom Calculate business rule? I am trying to copy a value from the Cb#Financial cube to the Cb#CASH cube. However, using the “api.Data.Calculate” code below I get the error “Invalid destination data unit in script” even though the Data Unit defined in my Data Management step matches the target cube Data Unit. Dim sTops As String = ":C#Local:S#AOP_Final:V#Periodic:A#BGMOPEX:F#EndBal_Input:O#BeforeAdj:I#None:U1#TopUD1:U2#TopUD2:U3#SALARY:U4#TopUD4:U5#TopUD5:U6#TopUD6:U7#None:U8#GC_USD" Dim sNones As String = ":Cb#CASH:E#US01:S#CashForecast_Forecast:T#2024M10:C#Local:V#Periodic:F#EndBal_Input:O#Forms:I#None:U1#None:U2#None:U3#NoVendor:U4#None:U5#None:U6#CashForecast_Plan:U7#None:U8#GC_USD" Dim dPayroll As Decimal = api.Data.GetDataCell("Cb#Financial:E#US01" & sTops & ")").CellAmount api.Data.Calculate("A#PAYUSA" & sNones & " = RemoveZeros(" & dPayroll & ")",True) In the past I have used the “BRApi.Finance.Data.SetDataCellsUsingMemberScript(si, objMemberScriptValues)” method and the “DM Data Export / Import” method to move data between cubes, but I was hoping that I could use a simple api.Data.Calculate utilizing the “Cb#” filter. Is this possible? Thanks.SolvedRandyThompson28 days agoNew Contributor III41Views0likes1Comment