Discuss formulas and business rules for your application.
Recently active
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
Hi all, I'm bit new in developing rules in one stream and I have a simple question. I'm trying to retrieve the accountId member name from a member formula on the account itself. I'm using the below code but it seems api.Pov.Account.Name is not working, if I replace it with the account name it works. Dim AcctName As String = api.Pov.Account.NameDim AcctId As Integer = api.Members.GetMember(DimType.Account.Id,AcctName).MemberId Any suggestion?
Hi all I accidentally deleted a Business Rule by loading a XML file with an older version on top of it. Is there any way to recover it? Cheers
Hey folks, Just wondering if we can automate IIS reset in the task scheduler. I don't see any Snippets or related BRApis in the Extensibility Business Rules. Surfed through various Community posts but, didn't help much. Any guidance here will be helpful.
Dear Community, How to get multiple time period data in FDX ? We have data's in row manner. We need it in column wise. The data is imported into a table using FdxExecuteDataUnit function.
I have an issue with the member formula with the below condition. It checks for Account Type Revenue or Expense. However if the Account Type is Revenue or Expense, still the condition is not met. Is there any issue with the way the condition is written? If api.Account.GetAccountType(api.pov.account.memberid).Equals("Expense") _Or api.Account.GetAccountType(api.pov.account.memberid).Equals("Revenue") Then Return 1 End If
Hello There, Is there a way to get the 'Integer' behind each Account Type based on a 'String' ?Context: I am trying to create new Account Members with pre-defined properties, all properties were straightforward except for the account type. Below a code portion for modifying a property & a hardcoded solution: myaccountMember = BRApi.Finance.Metadata.GetMember(si, DimTypeId, accountID, True) Dim AccProperties As AccountVMProperties = myaccountMember.GetAccountProperties() 'Add AccountProperties '*** Text123 *** AccProperties.Text1.SetStoredValue(ScenarioType.Unknown.Id,DimConstants.Unknown, mytxt1) AccProperties.Text2.SetStoredValue(ScenarioType.Unknown.Id,DimConstants.Unknown, mytxt2) AccProperties.Text3.SetStoredValue(ScenarioType.Unknown.Id,DimConstants.Unknown, mytxt3) '*** AllowInput *** AccProperties.AllowInput.SetStoredValue(Boolean.Parse(isAllowInput)) '*** Account Type *** Dim accTypeInt As I
Hi Everyone. I have the following section of code. 'Search for values for the DataBufferCellPK, they are not empty. Dim dbcpk As New DataBufferCellPk( mbrRefIdAcc, mbrRefIdFlow, intOriginId, mbrRefIdIC, mbrRefIdUd1, mbrRefIdUd2, mbrRefIdUd3, mbrRefIdUd4, mbrRefIdUd5, mbrRefIdUd6, mbrRefIdUd7, mbrRefIdUd8 ) 'BRApi.ErrorLog.LogMessage(si, $"values of DataBufferCellPk: MbrRefIdAcc: {mbrRefIdAcc}, MbrRefIdFlow: {mbrRefIdFlow}, IntOriginId: {intOriginId}, MbrRefIdIC: {mbrRefIdIC}, MbrRefIdUd1: {mbrRefIdUd1}, MbrRefIdUd2: {mbrRefIdUd2}, MbrRefIdUd3: {mbrRefIdUd3}, MbrRefIdUd4: {mbrRefIdUd4}, MbrRefIdUd5: {mbrRefIdUd5}, MbrRefIdUd6: {mbrRefIdUd6}, MbrRefIdUd7: {mbrRefIdUd7}, MbrRefIdUd8: {mbrRefIdUd8}") 'BRApi.ErrorLog.LogMessage(si, "Parameters bufferdatacell: " & dupk.ToString & " * " & intViewId) Using dbConnFW As DBConnInfo = BRApi.Database.CreateFrameworkDbConnInfo(si) Using dbConnApp As DBConnInfo = BRApi.Datab
Hi Community members, Need your help on the below business rule, as i am unable to identify the errors. The rule wrote for to get the value from combobox value and run Data managment sequence to clear the data. Namespace OneStream.BusinessRule.Finance.BOYD_Clear_Data_2 Public Class MainClass Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As FinanceRulesApi, ByVal args As FinanceRulesArgs) As Object Try Select Case api.FunctionType Case Is = FinanceFunctionType.CustomCalculate If args.CustomCalculateArgs.FunctionName.XFEqualsIgnoreCase("ClearSeeding") Then '{Clear_Seeding}{Param=[|!ParamWFProfileEntities!|],Time=T#2023.BASE} 'Dim objList = api.Workflow.GetWFProfileEntities() Dim wfClusterPk As WorkflowUnitClusterPk = si.WorkflowClusterPk Dim intScenarioId As Integer = wfClusterPk.ScenarioKey Dim myWorkflowUnitPk As WorkflowUnitPk = BRApi.Workflow.General.GetWorkflowUnitPk(si) Dim intYear As Integer = BRAp
Hello, I am trying to set up a business rule that seeds the forecast from actuals to the forecast. This works easily when I am not using all entities to seed. However, I need to somehow take the actual data from each base entity and copy it all into 1 entity for the forecast. The client only needs to forecast at 1 entity but wants to include the actuals from every base. Is this possible to do in 1 rule? I know you can't have the entity on the left side of the calculation so I'm not sure how to solve. Thanks!
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.