Discuss formulas and business rules for your application.
Recently active
Hi, I'm trying to retrieve the value of the field "Text - Text 8" for an account dimension member. What formula should I use to get this value? Thank you in advance!
hello, good day; I created a new finance rule calculating the cash flow accounts using as source the balance sheet accounts, the hierarchy is not part of the balance sheet, it's at the same level; when I consolidate or translate the cash flow accounts, the amounts were deleted; but not for Balance accounts. Do I miss something in the finance calc for the data will be durable or something like that? thanks in advence and Best Regards.
Hi - has anyone tried to replicate excel Goal Seek function in Onestream. We have a bonus model calculation in excel which uses excel goal seek and circular reference with iterations options in Excel. We want to replicate it in Onestream. Has anyone done similar excercise.
Hi Everyone. Is there a way to prevent the insertion of duplicate information using that function? Dim selectionChangedTaskResult As New XFSelectionChangedTaskResult() selectionChangedTaskResult.ShowMessageBox = True Try Dim loadResults As New List(Of TableRangeContent) Dim fileInfo As XFFileEx = BRApi.FileSystem.GetFile(si, FileSystemLocation.ApplicationDatabase, strFilePath, True, False, False, SharedConstants.Unknown, Nothing, True) If strFilePath.XFContainsIgnoreCase("xlsx") Then loadResults = BRApi.Utilities.LoadCustomTableUsingExcel(si, SourceDataOriginTypes.FromFileUpload, "Temp.xlsx", fileInfo.XFFile.ContentFileBytes) selectionChangedTaskResult.Message = "File [" & strFilePath & "] Loaded" selectionChangedTaskResult.IsOK = True Else selectionChangedTaskResult.Message = "File [" & strFilePath & "] NOT Loaded" selectionChangedTaskResult.IsOK = False End If 'Delete the temp file If boolDeleteTemp
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?
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!
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.
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?
Looking for function in the business rules to derive prior quarter based on the year and month value passed from parameter?
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.
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)
Hi Everyone, We have multiple cubes in an application. Is there a way to retrieve the cube name using the entity dimension member. I have multiple entities in a excel sheet and I need to get the cube names for them. I tried the =XFGetMemberInfo(memberInfoType,dimTypeName,memberName). It did not work. Thanks
Dear Community, Can anyone please guide me the proper usage of the function BRApi.Database.SaveDataTableRows(dbConnApp, tableName, columns, hasPrimaryKeyColumns, editedDataRows, throwIfRowForUpdatesDoesntExist, throwIfRowForDeleteDoesntExist, logErrors) I would like to understand the correct usage of XFDataColumn and XFEditedDataRows in the above function, would appreciate any assistance. Thank You.
Hello Everyone, I’m not sure if I’m not understanding or just approaching the code wrong. We’ve been on OneStream for about two years and myself and my co-admin are not extensive in our code knowledge. We can generally copy/tweak what the implementation partners build, or searching the forums here, but I’d put us as basic or being generous intermediate level. We have a workflow that loads to the actual scenario and has some workflow steps at the end that are for a variance scenario where the users enter commentary balances. The Variance scenario steps auto lock when certified and I want a business rule to unlock the variance steps if the Actual Import_Ledger step is re-run. I have code in the TransformationEventHandler rule that accomplishes this for me, but when users are running the import it gives the error of user has not been granted access to application role “UnlockWorkflowUnit” I thought (possibly erroneously) that by using a business rule the system would allow unl
Hi, Is there a way to perform a force consolidate in a BR? since running a datamgmtsequence isn't working properly for me. Example: Select Case api.FunctionType Case Is = FinanceFunctionType.CustomCalculate 'If args.CustomCalculateArgs.FunctionName.XFEqualsIgnoreCase("Test") Then 'api.Data.Calculate("A#Profit = A#Sales - A#Costs") 'End If brapi.utilities.ExecuteDataMgmtSequence(si, "PLN_Consolidate_AnyScenario", Nothing) End Select And with this, the consolidation doesn't run; I'm not sure if I'm missing sending information or something like that.
May I have an example of how to use "DynamicCalcTextInput" Formula Type? I cannot find the place to put text annotation without using data cell annotation.
Hi all, I am facing an issue regarding my ability to reference global objects between two different business rules, one of which is a finance business rule and the other of which is a connector business rule. To be more specific, the flow goes like this: First, I execute the finance business rule function that generates my global object, which is a DataTable, from a connector business rule: BRApi.Finance.Calculate.ExecuteCustomCalculateBusinessRule(si, "Utilities", "GetDataTable", povInfo, CustomCalculateTimeType.MemberFilter) Then, in the GetDataTable function of the Utilities finance business rule, I create a DataTable and save it as a global object: Dim dtCEDR_Integ As New DataTable("CEDR") 'add data to data table globals.SetObject("dtCEDR_Integ", dtCEDR_Integ) Then, back in the connector business rule, I try to get that global DataTable object. Dim dtCEDR_Integ As DataTable = globals.GetObject("dtCEDR_Integ") However, when I attempt to import the
Hello again, it seems that the error was not completely corrected, so I have the same problem as my previous post. Scenario 'Forecast 2023M10’s workflow settings do not allow input for Time member ‘2023M9’. I know this is a bit strange, but I need to modify values from the previous month. For example, now that I’m in November, I want to affect September. In February, it allows me to make these modifications because it’s still possible, but I want to do the same for the following months. The function value gives me as a form and I believe it is necessary to pass it to import, but I have no idea how to do it. For Each strItem As String In ({"Amount", "Annotation"}) Dim listTargetDC As New List(Of DataCellEx) For Each drResult As DataRow In dtResult.Rows Dim dcpkTarget As DataCellPk = drResult("DataCellPk") If strItem.Equals("Annotation") Then dcpkTarget.ViewId = BRApi.Finance.View.GetIdFromName(si, "Annotation") End If
Hi everyone. I have a problem with setdatacells, and it sends the following error: Scenario 'Forecast 2023M10’s workflow settings do not allow input for Time member ‘2023M9’. I know this is a bit strange, but I need to modify values from the previous month. For example, now that I’m in November, I want to affect September. In February, it allows me to make these modifications because it’s still possible, but I want to do the same for the following months. The function value gives me as a form and I believe it is necessary to pass it to import, but I have no idea how to do it. For Each strItem As String In ({"Amount", "Annotation"}) Dim listTargetDC As New List(Of DataCellEx) For Each drResult As DataRow In dtResult.Rows Dim dcpkTarget As DataCellPk = drResult("DataCellPk") If strItem.Equals("Annotation") Then dcpkTarget.ViewId = BRApi.Finance.View.GetIdFromName(si, "Annotation") End If Dim dcTarget As New DataCell(dcpk
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.