Discuss formulas and business rules for your application.
Recently active
Howdy, Background: I have a data management job that runs a Business Rule. I have created a dashboard with a button that can trigger this data management step. Problem: As an Administrator I can run the data management job, or I can click the dashboard button. As a user when attempting to use the button the following error happens: "Summary: Error processing Data Management Step 'xxx'. Unable to execute Business Rule 'yyy'. Object reference not set to an instance of an object." I have read that this is really just a catch all error. I think I have narrowed the problem down and believe it is because the users do not have permissions on the BatchHarvest Folder (which is referenced in the job). So, one question I have is: can a Data Managment job be triggered to run "as an admin" that I could assign to the button?
Hello, I am trying to adjust the code below to handle the following situation: The client loaded data for Test Rate and Test Count on UD1 "ID". The data buffers defined for prior month (TotDirCOGSDataBuffer and DirCOGSDataBuffer) do not have any values for UD1 "ID". The client wants to do the calculation for UD1 "ID" as follows: take the prior month data from another UD1 member, multiply with the Test Rate and Test Count for UD1 "ID" and place the results on UD1 "ID". How I can accommodate this change, considering this will happen also in the future when they need to perform a calculation on a UD1 member which does not have values in prior months? 'api.Data.ClearCalculatedData(True,True,True,True,"U7#DirCOGS_Calc") api.Data.ClearCalculatedData(True,True,True,True,,,,,,,,,,,"U7#DirCOGS_Calc",) 'Create a result data buffer and destination info to add the cells to later Dim resultDataBuffer6 As DataBuffer = New DataBuffer()
Morning All, I'm working on a new solution to avoid having many, many separate confirmation rules with their own code which is almost identical in each case, and instead move to using a public function so that the similar code is recycled. Seems like a sensible idea! I've got a basic prototype roughly working. So I've created a public function in Finance Business Rules which I am then calling from inside the confirmation rule code. ie. the first code snippet is the public function and the second code snippet is the confirmation rule code calling it. So far, so good and I've proved that the public function is indeed running when I run the confirmation rule (the error log message appears as expected) so I'm pleased so far! What I now want to do is pass in some parameters from each confirmation rule, ie. the only thing that will be different in most cases is which accounts are being checked. So here is where I'm stuck. Within the code that calls the public function I want to be able to pu
Hello, The client has a calculation for the planning process where I used the prior period values in the calculation for current month values. Here is the data buffer I created: Dim OpCostsDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(RemoveZeros(F#Top:O#Top:T#POVPrior1:I#Top:U5#None:U6#None:U7#Top:U8#Top),A#Op_Costs.Base,U1#Top.Base, U2#Top.Base) Then, the client had another idea to accommodate where if the calculation is for first month (M1) take a 3-month average and then for the calculation of the subsequent months (M2 – M12) revert to the original logic of trending on prior month – POVPrior1. I added this logic, where I included an IF statement: Dim OpCostsDataBuffer As DataBuffer = New DataBuffer ()If POVPERIODNUM = 1 Then OpCostsDataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(RemoveZeros(F#Top:O#Top:T#" & Year1 & "Q4" &":I#Top:U5#None:U6#None:U7#Top:U8#Top),A#Op_Costs.Base,U1#Top.Base, U2#Top.Bas
Hi Community, We have a cubeview that pulls more than 40k records when run for a period in a dashboard. It runs base level for couple of UDs that have ~30k members and 200 members. It renders fairly quickly on dashboard although with paging, but when for exporting the output and running using FDX via DM job (through BR) its taking a lot of time to run. I thought time it takes to run a CV manually should be same when called via Business Rule. Please let me know how can I match the cube view performance when run manually to when I call in a Business Rule. I checked and matched the sparse rows settings both in rows and columns among other checks to match but cannot figure out why it runs slower when i run through business rule.
I'm trying to write a business rule creating a KPI which returns the value of an account for same period previous year. I already have a working business rule creating a KPI which returns the value of the current period which has the following formula: Return api.Data.GetDataCell("A#38999:T#" & api.Pov.Time.Name &"").CellAmount Where 38999 is the account number for which I want to get values. What formula should I use to, instead of the current period, get the current period but for the same period previous year? Many thanks in advance!
Dear community, When we execute an allocation in OneStream (the one when we right click on a Cube View cell), we can indeed execute an allocation. I was checking but I couldn't see any logs or audit information regarding this allocation. Does anybody know if there's an audit table, or any logs, that are related to this allocations ? On the other hand, are there any event handler related to the execution of this allocation ? Regards,
I need to export the annotation and data for certain intersection to an external table. I am able to do that using FDX from cube view but can that be done without a cubeview? I am not sure if FDX of data unit would work and if does then how to? When I used that I get only the data.
I am able to get some export using the FdxExecuteCubeView function but the exported data does not match with the Cube View. I add too many columns in the export and a lot of columns that are in the actual CV are missing. For instance the below two rows are same in terms of data, but the excel export from data explorer shows the entity ID, while it does not show that entity ID in the data table exported to external SQL table. Also, there are missing annotation columns in the data table export too. Code: (I don't want to filter anything)
I am trying to save the XML files in the application zip file as separate XML files rather than a single zip. I get the zip file as a byte array and then pass that to XFZip.Unzip The code executes without an error and without any files being saved as well. Does anyone have any suggestions or can point out where I am going wrong with the code? OnPrem V7.4.2 Dim xmlOptions As New XmlExtractOptions xmlOptions.ExtractAllItems = True Dim folderNameForExtract As String = "XMLs" Dim extractPath As String = $"{Environment.GetEnvironmentVariable ("Temp")}\{folderNameForExtract}\" 'Execute the Metadata Extract Using dbConnFW As DBConnInfo = BRAPi.Database.CreateFrameworkDbConnInfo(si) Using dbConnApp As DBConnInfo = BRAPi.Database.CreateApplicationDbConnInfo(si) Dim zippedBytes As Byte() = ApplicationZipFileHelper.Extract(dbConnFW, dbConnApp, Nothing, xmlOptions) XFZip.Unzip(zippedBytes, extractPath) End Using End Using
Afternoon All, I'm looking to create a set of standardised confirmation rules as Finance Business Rules which I then want to reference from the confirmation rule itself to cut down on maintenance. I'm pretty sure this is possible and I've seen some other discussions but I can't quite figure out the code to use in the confirmation rule to trigger the finance rule. I've seen Dim sharedFinanceBR as New OneStream.BusinessRule.Finance.RulesName.MainClass as an option but this syntax doesn't seem to be available in the confirmation rule code. I think maybe it only works in only business rule types? Is anybody willing to share their code please? (Just the part that triggers a public function from a confirmation rule). Thanks! Richard
Hi, Has anyone had success with viewing the GolfStream reporting formulas such as Return on Assets or Asset Turnover? I'm trying to learn how to write some ratios and it would be so helpful to view these. Unfortunately, the formula is greyed out. Please see below.
Dear Community, I am trying to run an allocation finance rule. I believe I have set up everything for that in the business rule. However, upon running the BR I get the message "An internal method is not implemented" Please find below the business rule (currently set on a demo asset) : Dim MyAllocationType As allocationtype = Allocationtype.EvenDistribution Dim MyAllocationOptions As New allocationoptions Dim MyAllocationResult As New AllocationResult MyAllocationOptions.AllocationType = MyAllocationType If MyAllocationType = AllocationType.EvenDistribution ' The value to allocate MyAllocationOptions.SourcePOVMemberScript = "Cb#Houston:E#[Houston Heights]:C#USD:S#BudgetV2:T#2022M12:V#Periodic:A#2000_100:F#None:O#Import:I#None:U1#None:U2#Mach5:U3#NA:U4#[Active Hub]:U5#None:U6#None:U7#None:U8#None" ' Any override to be done on source value MyAllocationOptions.SourceCalcScript = "A#SourcePOV * 0.1" ' Target POV, must be lowest level on all dim except the one being allocated MyAllo
I am trying to extract a static cube view data but getting an error. The CubeView has all static members except the time dimension |WFTime| but I made it static in my code just to be sure. To begin with I only need the data table. But I am getting below error
Hi everyone, I'm having trouble logging a databuffer to the error log. I want to be able to do this to debug some code I've written. I got this concept from the Finance Rules and Calculation Handbook so I believe it's possible but I can't get it to work for me! In the first screenshot is the code. The red box shows the logdatabuffer script that I've written. I know there is data in the databuffer because it produces sensible results (ie. the green box) albeit not quite right, hence why I want to visualise it. The second screenshot shows what I see in the error log. I believe I should be seeing the databuffer results in the orange box area but I just see a blank. Do I need to "switch on" this functionality somehow? What am I doing wrong?!!! Thanks in advance,Richard
I've got a Tableview embedded in an Excel workbook and would like to be able to prompt the user to select an entity and period that is then used to filter records. Is this possible?
I'm running a SQL query to display the data as if it were a QView, but I realized that the table I was using didn't contain the values it should. SELECT EntityId, UD1Id, UD4Id, TimeId, ICId, Amount, FlowId, ConsId FROM DataEntryAuditCell WHERE ScenarioId = ( SELECT MemberId FROM Member WHERE Name = '|WFScenario|' ) AND CubeId = 4 AND ICId != -999 AND AccountId = 17826015 AND Amount != 0 AND FlowId IN (1048639,-999) AND UD1Id != -999 AND UD4Id != -999 The reason for using SQL is to facilitate user access to that specific information, as a QView wouldn't display everything according to the required permissions, which in this case doesn't apply as
Hello, If anyone needs to sort a specific account group by ascending. This is the codes it worked. Sub RemoveandSortAccounts(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardExtenderArgs) Dim ParentGroup As String = args.NameValuePairs.XFGetValue("ParentGroup") Dim osAccountMember As Member = BRApi.Finance.Members.GetMember(si, dimtypeid.Account, ParentGroup) Dim actDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si, "ST_Accounts") Dim osBaseList As list(Of Member) = BRApi.Finance.Members.GetChildren(si, actDimPk, osAccountMember.MemberId) Dim osBaseList2 As list(Of Member) = BRApi.Finance.Members.GetChildren(si, actDimPk, osAccountMember.MemberId) osBaseList2.Sort(Function(x, y) x.Name.CompareTo(y.Name)) If osBaseList.Count > 0 Then For Each baseMember As Member In osBaseList 'osBaseList '===Remove first==== Dim PId As Integer = BRApi.Finance.Members.GetMemberId(si, dimTypeId.Account, osAccountMember.Name) Dim myId
Hey guys! Just a reminder: if you're going to post code in this forum, please make it easier to read by using the "Insert/Edit Code Sample" button on the expanded formatting toolbar. Here's a short video showing how it works. If you need to edit code after you created the block, just double-click on it. Ideally you'd also indent it first, either in an editor or with something like DotNetFiddle. Remember: the easier it is for others to read your code, the more likely that they'll be able to solve your problem! Cheers!Your friendly neighborhood Spider-Mod
Looking for function in the business rules to derive prior quarter based on the year and month value passed from parameter?
SOURCE: ONESTREAM CHAMPIONS Company has a hard carriage return in their file for a couple of description fields. They are struggling to fix it on their side. Is there code that can be written for the data source to remove this hard return and get everything on one line? Appreciate any guidance or snippet of cod
Spoiler (Highlight to read) Summary: Error processing Data Management Step 'App2App_Parallel_Step'.Unable to execute Business Rule 'App2App_Parallel'. An item with the same key has already been added.
Hello, Can we figure out sibling sort order for existing members and add the new members at a specific position in hierarchy through extensibility rule? Any samples would be helpful.
Hai everyone, I am trying to access the data from excel through business rule and use it in the business rule.If anyone know the VB.net code,please share with me.
Hello, I an trying to write a calculation to divide one number by another one and have it to flow into a new account. Below is the formula I am using, but I am not getting the date to calculate. Can someone assist on how to write it correctly. Calculate("A#mpg test","Divide(A#33010, A#33005)",deptFilter)
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.