Discuss formulas and business rules for your application.
Recently active
I'm making a simple event handler rule that sends an email when a workflow is processed. I would like the email to include the datetime when it was processed, the user who did it, the workflow, workflow profile and entity. However I've only been able to include the date and time. My code is structured like this: Main calls the sub XFR_HandleEndProcessCube() Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DataQualityEventHandlerArgs) As Object Try Dim returnValue As Object = args.DefaultReturnValue args.UseReturnValueFromBusinessRule = False args.Cancel = False Select Case args.OperationName Case Is = BREventOperationType.DataQuality.ProcessCube.EndProcessCube Me.XFR_HandleEndProcessCube(si, globals, api, args) End Select Return returnValue Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function XFR_HandleEndProcessCube() sub sends the email, using the help
Namespace OneStream.BusinessRule.Finance.XFR_MemberListAlphabetical Public Class MainClass '--------------------------------------------------------------------------------------------------- 'Reference Code: XFR_MemberListAlphabetical ' 'Description: Use a business rule to sort a member list in Alphabetical order ' 'Usage: This will put a member list of a dimension in Alphabetical order. ' Use the following on the cube view: ' E#Member.[Name of Business Rule, Name of List in Business Rule] ' e.g. E#Root.[XFR_MemberListAlphabetical, EntityAlphabetical] ' 'Created By: Robert Powers (put in XF Ref by John Von Allmen) ' 'Date Created: 5-24-2013 '--------------------------------------------------------------------------------------------------- Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, _ ByVal api As FinanceRulesApi, ByVal args As FinanceRulesArgs) As Object Try
All,I have a form populated with data & I am trying to retrieve the data through the Finance BR under calculate. It is not displaying the data in the error log.Sample Data. I am trying to retrieve the data at Parent Entity with Base ICP intersection. BaseICP - 3000Parent Entity - P10000.2The below is the code If api.Pov.Scenario.Name="Actual" And api.Pov.Cons.Name="Elimination" Then Dim Entity As String = api.Pov.Entity.Name Dim Parent As String = api.Pov.Parent.Name Dim Ownership As Decimal = api.Data.GetDataCell("E#" & Parent & ":C#Local:S#ActualOwnershipCalcs:A#UltimateOwnership:F#None:O#Top:I#" & Entity & ":U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None").CellAmount &nbs
Looking for some code on grabbing all entities with a text1 field of "ABC" and then run logic on them. I didnt see anything in the Golfstream app to use.
Hi Folks,Can anyone give me an example of moving an entity from one parent to another using ReadRelationshipNoCache? Or even the version using GetRelationshipInfo?CopyOrMoveRelationships doesn't have a 'no cache' option, so looking to do it at a lower level by reading and updating the member's relationships (i.e. dropping one and adding another) -Jon
Hi everyone,We’ve been using the SaveDataEventHandler to prevent users from submitting zero values for a specific scenario and flow. While the error message works perfectly in the Cube Views, we’ve encountered an issue when users try to submit a zero from Excel—no error message is displayed. From what I’ve read, error messages don’t work in Excel.As a workaround, we’re considering a different approach: instead of throwing an error when a zero is submitted, we would save the zero as NotStored (dataCellStorageType.NotStored) and NoData (dataCellExistenceType.NoData). However, despite our efforts, we can’t get SaveData to function as expected. Has anyone encountered this issue or have any ideas?Dim ScenarioName As String = "Actual"Dim FlowMember As String = "USDOverrideEndBal" If args.NewDataCell.DataCellPK.ScenarioId = BRApi.Finance.Members.GetMemberId(si, dimtype.Scenario.Id, ScenarioName) Then If args.NewDataCell.DataCellPK.FlowId = BRApi.Finance.Members.Ge
I'm trying to build a label that shows target goals for each entity. Now since each region has different goals. I'm looking for my label to change the value based on the entity selected. Here is an example (We're still in development so not the most eye catching) Its referencing a parameter -- How can I pass a condition or a rule that reads the POV entity and shows me that specific value.
Hi All - I have a quick question When I am using the Data Buffer, I am able to write to the Elimination Member.The Same for the Set DataCell as well.When I try to use the same in the Member Script Value it is not writing to the Elimination Origin except forms. Any Idea why ?Below is an example' strMemberScript = "Cb#Cube:E#100:C#Local:S#Actual:T#2022M12:V#YTD:A#123456:F#None:O#Forms:I#101:U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None"' objMemberScriptValue.Amount = 100' objMemberScriptValue.IsNoData = False' objMemberScriptValue.Script = strMemberScript'
I am updating a customization to the Account Reconciliations solution to version 8.4 and have converted my custom business rules into a workspace assembly/assembly files.I added a custom maintenance unit to the OneStream Financial Close workspace to build said assembly and I am now having issues calling my assembly, specifically, the workspace assembly service factory file I created is not getting recognized.I found an instance of a button in the Reconciliation Manager MU where a button component calls upon the Integration assembly in the Integration MU using the following syntax:{Workspace.Current.Integration.WSMU}{OnOpenDetailItemTransactionDrillbackClick}{ItemID=[|!SelectedReconItemID_RCM!|]}I also have my Workspace Assembly Service that I created set on my custom maintenance unit:So after adding my own custom button (to appear on the Account Recs UI) in the Reconciliation Manager MU, I followed the same logic for executing the call, below is an example:{Workspace.Current.MyAss
We are working on a POC to extract data using FdxExecuteDataUnit. We are using an Extensibility business rule and running it using a DM job. I am getting assistance from our corporate IT group as I am not good with C#. The business rule is writing data to a table and then is taking the data from the table and putting it in a text file. There is something missing or wrong with this and I am hoping someone can help with the code since I do not have access to the TechTalks that focus on FdxExecute. The code was written to do the FdxExecuteDataUnit and then also write some sample data to the table. This way if the FdxExecute does not generate any data we at least get a file with the sample data. I am getting a file but it only has the sample data spelled out in lines 100-150 of the business rule. I am also getting the following warning when I compile the rule: "1) Warning at line 54: Unreachable code detected" If I comment out that line
I've tried to implement this function as per the Business Rules Editor snippet: Dim objByte() As Byte() = BRApi.CubeViews.Process.ExportCubeViewGridsToExcelFile(si, custSubstVarsForAllCubeViews, cubeViewNamesAndVars) However, I've had a few problems with this, the main one being that I've been unable to save whatever it returns to an Excel file. Here's what I've tried: Dim fileName As String = "test.xlsx" Dim filePath As String = $"Documents/Users/{StringHelper.RemoveSystemCharacters(si.UserName,False,False)}" Dim XFfileDataInfo As New XFFileInfo(FileSystemLocation.ApplicationDatabase,fileName,filePath) Dim XFfileData As New XFFile(XFfileDataInfo, String.Empty, objByte) BRApi.FileSystem.InsertOrUpdateFile(si, XFfileData) Whenever I run this code the output file is an XML. How do I save this to a .xlsx file?
Hi All - I have a scenario where I need to copy the data from Parent Entity to the Base Entity with ICP. ThanksKrishna
Hello All, SetDataCellsUsingMemberScript() seems to only write the last value added to list. I am successfully adding 14 records to the objMemberScriptValues list (I can loop through them and see the 14 unique intersections) but only the last one is being updated in the cube. I'm looping through the records in a datatable and then each intersection is added to the list: '*********************************************** For Each row As DataRow In dt.Rows strProfileName = row.Item("ProfileName").ToString strCube = row.Item("Cube").ToString strEtT = row.Item("EtT").ToString strCnT = row.Item("CnT").ToString strSnT = row.Item("SnT").ToString strTmT = row.Item("TmT").ToString strVwT = row.Item("VwT").ToString strAcT = row.Item("AcT").ToString strFwT = row.Item("FwT").ToString strOgT = "Forms" strIcT = row.Item("IcT").ToString strU1T = row.Item("U1T").ToString strU2T = row.Item("U2T").ToString strU3T = row.Item("U3T").ToString strU4T = row.Item("U4T").ToString strU5T = row.Item("
Hi everyone,In my environment, I had some calculated data in 2023Q4. 2023Q4 was completely locked and certified.After that, I loaded a zipfile, containing XMLs consisting of Cube Views, Data Management Steps, Extensibility Rules, Metadata and some dashboards. I uploaded this to update an existing partnerplace solution running in my application.After loading the zip file, the calculated data from 2023Q4 was gone. After recalculating, the data was back, so no issue. However, I'm very confused on how the load of a zip file containing XMLs could have affected calculated data in a locked period. Thanks for any help or information.Kind regards,Floris
Data Mgmt sequence and steps work great when utilizing a 'manual' initiation of this process and business rule. However, the DM process automatically initiates twice daily at specific times using the same code and rules. When this occurs, it fails on occasion (not always), and this error message is received: Summary: Error processing Data Management Step 'ProcessRecons_RCM'. Unable to execute Business Rule 'RCM_DataMgmtProcess'. One or more errors occurred. () Concurrency violation: the UpdateCommand affected 0 of the expected 1 records. This is the business rule in use... asking if anyone can spot an obvious issue I have overlooked or might know the cause of the failed task on occasion. Business Rule: 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.ExecuteDataMgmtBusinessRuleStep 'Prepare Parameters Dim wfProfile As String = args.Na
Hi experts, hoping someone can guide me. Our P&L is recorded by Line of Business (UD2), however our balance sheet is recorded to UD2 None. FPA has a requirement that they currently handle manually to "allocate" the balance sheet to the lines of business based on the percent of revenue. Our partner initially achieved getting closer by using a dynamic formula on UD8. This does not ultimately provide the accurate results at the consolidated level (due to nature of dynamic formula). We believe we need to change this to a formula pass but it is proving to be challenging. We are open to suggestions, using UD7 (tracking) or UD6 (reporting). I am also open to creating a mini alt acct hierarchy since it really only needs to apply for a handful of summary level accounts. (Coding examples would be so very appreciated!) Thank you!
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 debuggingBRAPI.ErrorLog.LogMessage(si, "vDate: " & vDate) ' Ensure vDate is not null or empty before proceedingIf 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 chara
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 chan
For starters, we're on 8.2.1.In reviewing some automation rules that were written by my predecessors, I've been trying to move away from the Harvest folder batch processing. ...mostly, because I don't want to deal with cleaning up the clutter it leaves in the filesystem.In most cases, it's trivial to switch to BRApi.Import.Process functions and I've done this successfully but I find that running the Process Cube from a BR acts a bit weird. BRApi.DataQuality.Process.StartProcessCube and BRApi.DataQuality.Process.ExecuteProcessCube both start the process just fine and the process does exactly what it should. However, both methods only start the process and immediately move on to the next instruction. I can't seem to evaluate them for failure, duration, or anything else as they both instantly and always return that they finished successfully. Question 1: Both functions seems to behave identically and incorrectly (or at least unintuitively and undesirably for me in this case.) Other than t
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!
I'm trying to execute a calc after an input data in a CV, when the user click in the OS default save button (giving the flexibility to use a DB, CV or Excel addin with the same CV) Is possible?
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,Preeti
Hi All,Let's say we have a table:Fruits (Annotation) Updated Fruit Value (annotation) Price of Fruit (input numerical value)apple banana $1.99banana kiwi $2.99strawberry  
I'm trying to lookup the users in a workflow execution group so I can e-mail them when the harvest batch process runs successfully. Below is the code I'm using to try and lookup the users within a workflow execution group. The problem is I don't know what to put in the "WorkflowGroupType" as Integer argument. I know that any number between 0 and 1249 will allow the function to run, but putting 1250 will error the function. I created a loop just to see if I could get any of the valid values to return something and didn't have any luck. Has anyone been able to successfully do this? Thanks!
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 re
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.