Discuss formulas and business rules for your application.
Recently active
Dear community. I have a use case where I need to sul up data from 2 different entities and apply a ratio on it. For this, I would like to use a data buffer. However, the data buffer typically only run on a data unit hence 1 entity at a time. So I created a data management job dat would run on these 2 entites, and I wanted to use a Globals object along with this data buffer so that I could store data from these 2 entities into a single data buffer. However, I'm not sure if it's the right way to do it ? Is there a way for a data buffer to take data from 2 entities ? Or, if I use a globals object with a data management sequence, is the Globals object persisting when running on 2 different entities ? Many thanks for your anticipated feedbacks ! Regards,
Anyone has called and executed Excel function (Forecast.ETS) from within a business rule?
When i tried copying the data from one cube to another cube using Eval function with Buffer [Calculate(formula, onEvalDataBuffer, userState)], the data got copied at the base level but as soon as i consolidated it, the data got cleared from the same destination intersections.On checking the cell status of the destination cell (intersection), i found that the storage type is Calculation Whereas, if we use api.Data.Calculate(formula, isDurableCalculatedData), the storage type is DurableCalculation, and consolidation works fine after using this Calculate function.We do we have a boolean parameter to set the DurableCalc as True or False in the api.Data.Calculate(formula, isDurableCalculatedData) function, but i didn't see any such parameter or setting for Buffers [Calculate(formula, onEvalDataBuffer, userState)].How can i make the StorageType as Calculation to DurableCalculation for Buffers, so that the values doesn't disappear after consolidation ?
Hi All,I am trying to extract data from cube view using FdxExecuteCubeView function and load the result back to cube through a connector. However, when I execute the workflow dataload, a "No valid DataKeys (Scenario / Time)" error occurred. I checked the log, it pointed out to be "Non-Numeric Amount ..................... 4" error On the log, I am able to see the data I extracted as this :4: Cube1, 568123, , Local, Budget, 2023, Periodic, 702151, None, BeforeAdj, None, 500100, None, None, None, None, None, None, None, 959.799999996It seems that the data was pulled right, but just the amount cannot be recognized as numeric dataOn Data Source, I did map "Amount" to the "Amount" column. I am not sure why 959.799999996 is not considered as an amount? Here is the mapping. Here is the Rule itself. Case Is = ConnectorActionTypes.GetFieldList'Return Field Name ListDim timeMemfilter As String = "T#2023"Dim isTimePivot As Boolean = FalseDim useGenericTimeColNames A
I am launching a business rule through a Data Management job for all the base entities of certain rollup, i.e, TopEntity.base. As expected, the code loops through all the base entities and executes the code. I want to log the POV passed in for troubleshooting purposes. When I log the message, it logs it for each iteration of the code. Is there a way to only log the message for the first iteration of the code to avoid logging multiple entries to the log? As a workaround, I have hard-coded a specific entity, but if I can avoid hard-coding that would be ideal. Below is the code snippet:#Region "Clear_Calculated_Data"If args.CustomCalculateArgs.FunctionName.XFEqualsIgnoreCase("ClearCalculatedData") ThenDim sTime As String = api.Pov.Time.NameDim sScenario As String = api.Pov.Scenario.NameDim sEntity As String = api.Pov.Entity.Name 'Logging Info for Troubleshooting Purposes - Using Single Entity so message is not logged multiple timesIf sEntity = "Ent_005" Then Brapi.ErrorLog.LogMe
We are trying to do a multi-year planning application. One requirement is the ability to calculate out-months into the next year of the plan. One solution that would be very useful is the ability to run a custom calculation with a variable set of time periods. "BRApi.Finance.Calculate.ExecuteCustomCalculateBusinessRule" has an enumerated argument of CustomCalculationTimeType. One of the enumerations is "MemberFilter", but there is no indication or documentation regarding how to supply the member filter for Time periods to execute for. Would anyone know how to implement this, or where I could find the details regarding its usage? Thanks in advance for any information or leads.
Hi all except for the standard operators (+,-,*.....) are you aware of a complete list of operators that can be used in "api.Data.Calculate"? I have checked the official documentation with no success. In my case I would like to use the Absolute value in a formula that more or less shoud work in this way api.Data.Calculate("F#ABS_Element = ???AbsoluteValue???( F#ORIGINAL_ELEMENT) ) Thanks in advance for the help Marcello
We are currently using something like this to pull in the Global Time on the email we send out after the automationDim gTime As String = BRApi.Workflow.General.GetGlobalTime(si) This works just fine, however we would like to also have the option to load by wf which works we just cant get the wf time to show up on the email. I cant find the syntax like I did Global TimeThoughts? Thanks!
Good Day I am new to OneStream so forgive me if this question and the answer should be known but I have created a SQL table with values and I would like to take those values and write them to a cubeview. I am using a business rule and was wondering how would I do this. I am aware I need to make a sql connection so my initial code is:Dim sql As New Text.StringBuildersql.AppendLine(" SELECT * From x_BatchControl")Using dbConnApp As DBConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)Using dt As DataTable = BRAPi.Database.ExecuteSql(dbConnApp, sql.ToString, True)Looking for any help on this. Thanks Rehaan
I need to be able to write a confirmation rule that checks for nodata vs a value of zero. Can someone help with the syntax I have this - Dim cellstatus As DataCellStatus = api.Data.GetDataCell("Cb#CimpressConsol:P#TotCimpress:C#Local:S#Actual:V#YTD:A#BS_NoMap:F#EndBal:O#Top:I#Top:U1#Top:U2#Top:U3#Top:U4#Top:U5#Top:U6#None:U7#None:U8#None").cellstatusbut I dont know how to build the If to check on the result.
Logging with OneStream is great but when we all use the Error Log at the same time, things can get messy very quickly. Moreover, logging in a file instead of the Error Log can be very convenient when logging kickouts.The initial setup can be a little involving but once you get a knack out of it, logging in a file is as easy as using the Error Log.In this post, I will show you how to do the initial setup and then how to log into a file instead of the Error Log only when there is an exception or every time.This rule and methodology is the result of the genius work of Matt Ha and I am very thankful he shared it with us.Initial SetupIn order to log into a file, you need to import a Public Business Rule, it will be called by the logger and it is available in this post (GS_GlobalHelper.xml).Side note, remember that in order to make a BR Public, you need to change the setting for ‘Contains Global Functions for Formulas’ to True.Setup of the BR to log into a fileIn order to call a Public funct
Hi all, is there a possibility to create a data source and give it a fixed file-name on an UNC path instead of having to select it in the user-interface? e.g. assume I get the file always put to \\fileserver\sharename\subfolder\filename.csv and want to directly load from there.If not, what would be the workaround?ThanksMarkus
Hi all, We're trying to pass below listed parameters to the table view: Case Is = SpreadsheetFunctionType.GetCustomSubstVarsInUse Dim paramList As New List (Of String) paramList.Add("ParamScenario") paramList.Add("prm_UD4_Select") Return paramList Case Is = SpreadsheetFunctionType.GetTableView Dim objDictionary As Dictionary(Of String,String) = args.CustSubstVarsAlreadyResolved Dim objDataSet As DataSet = BRApi.Dashboards.Process.GetAdoDataSetForAdapter(si, _ False, "da_Capital_Reports", "Getfullreport", objDictionary) Dim dts As New DataTable() dts = objDataSet.Tables(0) Dim tableview As New TableView() tableview.PopulateFromDataTable(dts,True,True) tableview.CanModifyData=True Return tableview Case Is = SpreadsheetFunctionType.SaveTableView but the refresh sheet (via excel add-in) errors out as "Conversion from string "tu" to type 'Integer' is not valid.Input s
Hello,Is there anyway to review the code behind a Method Query. In my example I am executing the "CertificationForWorkFlow" method query for many months and many scenarios, appending the resultant datatables and then performing a LINQ query to join the appended tables. After I am returning them to a grid object in a dashboard. Unfortunately I reach an upper limit when I ask for too many scenarios and quarters of time. Therefore I am interested in reviewing the code underlying the Method Query and modifying it in an effort to 1) not reinvent the wheel since the current Method Query returns to tables the data I want 2) see if a modifcation would perform better than looping through scenarios/time, appending the datatable records and then performing the join through LINQ. Thanks, Steve
I have run into an issue with intercompany eliminations not performing as expected in a Periodic type scenario and believe I need to create a custom elimination rule to resolve, as suggested in the Design and Reference Guide. In the actual scenario (YTD), a balance sheet account is eliminating to the income statement without issue. In the planning scenario (Periodic), the balance sheet elimination amount appears in periods where the balance sheet account has no data. Below I've identified an excerpt from the design and reference guide referencing this type of issue. Can you assist with a sample code snippet for a custom elimination for this type of scenario?"If a Consolidation View is Periodic and no data is loaded to the IC accounts for a specific month, custom elimination rules are required in the FinanceFunctionType.ConsolidateElimination section of a business rule attached to the cube to calculate expected elimination results. This requires storaging the C#Share member, which impac
Hi,I am running a BR extender that starts a DM sequence with many steps. I can not find a way to update the %Completion. Those steps are all running a BR.Anyone knows how to do that?Thanks
What is the purpose of timeMemFilter, entityMemFilter and scenarioMemFilter parameters for the below function as these will be defined in the cube view? Is there a way to extract aggregated members as a table for the Account and all the UD1 to UD8 dims. Cube views have a limitation of 4 dims on the rows. This is required for an auto feed using OS REST api calls for an external system. We can export base data, dim structures using api calls and perform the aggregations in the external system but wanted to explore the option of aggregated data exports. BRApi.Import.Data.FdxExecuteCubeView( si, cubeViewName, entityDimName, entityMemFilter, scenarioDimName, scenarioMemFilter, timeMemFilter, nvbParams, includeCellTextCols, useStandardFactTableFields, filter, parallelQueryCount, logStatistics )
Hi all, I am creating a Reporting UD8 node that provides an on-the-fly calculation of the consolidated data at Budget Rates.It is working (mostly), except for one aspect that relates to the pulling of the percent consolidation data for the base nodes of a higher level parent. In this case, the percent consolidation for that node is not being picked up correctly. Here is the approach I have taken within the script and the steps to test / resolve. The scripting takes a simple approach of picking the Entity node queried and then pulling the appropriate level of base data, so cycling through all Entity base nodes of a given parent, pulling the PCON, Ex Rate and data point from Actuals in the local layer, and multiplying them together, then cycling through to the next base node.In terms of issue, the issue seems to be if i pick a parent that has one or two layers of parent / children beneath it, it fails to retrieve the correct PCON information. What the formula does ( a li
A1=100,A2=200 -> Both are Revenue account type and doesnt have any formula.D1=A1+A2 ->Account type and Formula type -> Both are dynamicCalcD2->Account type and Formula type -> Both are dynamicCalcWill the below formula works?D2=D1+100
Hi,We are using the following when we send out the automated email, and it works just fine. However is there a way to include the application name in the email? Reason being we would like the users (some who have access to Dev etc to be able to decipher from production application. BRApi.Utilities.SendMail(si, "OneStreamEmail", toEmail, "SAP Load Automation Errors in: " & gTime, "Please see the attachment for error details.", attachments)Thanks!
Hi Everyone!.I have the problem that a button is applying processes to a closed Forecast, for example, the open forecast is for June, but a user could select March or April and reapply those processes to those months that are supposed to be locked. In my case, it applies those processes even when the selected Forecast is closed, so it would help me if you could show me a way to validate it in the BR so that that process does not run (By process, I also refer to Data Management or a Business Rule).
Hi,I've created a tree view component using a business rule which works as expected. The part I'm struggling with is to make it so that it automatically scrolls to the selected tree view item when the dashboard opens like it does when selecting a new workflow view. Does anybody know how to do this?
Hi there,I'm seeking assistance with a specific requirement. I need a business rule to operate as follows: upon initial execution, it should function normally. However, if a user attempts to run it again, there should be a designated wait time before the next execution.For instance, if I initiate the business rule at 16:00, it should not be possible to trigger it again until 19:00, ensuring a 3-hour interval.To implement this, I intend to leverage the Task Activity Log Start Time. I'm using OS 6.3Any guidance on achieving this would be greatly appreciated.
Hi All, For a client i've created a SQL script that generates a datatable that i want to save to a .csv file. This works as expected via BRApi.Utilities.SaveFileBytesToUserTempFolder(si, si.UserName, sFileName, fileBytes) From this location i can present the file to the user from the dashboard button that is generating the export. However, this file is big and the user settings (of some users) change the number formatting of the export. Therefore i want to export the file directly to the shared folder (which is easy for the user to access from the front end: I've tried all options within brapi.FileSystem but cannot find the proper syntax to save this file directly. The 'issue' is currently solved by storing this file in the user temp folder, then copying it over to the shared folder (via another article on this forum) but that touches the file twice so preferably i want to save the file directly from the fileBytes (that is a
I'm making updates to some BRs that predate any of the current employees and when validating the rules I get warnings that I'd like to resolve. Specifically, these: 'Public Shared Overloads Function CreateSubstVarSourceInfo(dbConnFW As DbConnInfo, dbConnAppOrFW As DbConnInfo) As SubstVarSourceInfo' is obsolete: 'This is a temporary function used by Marketplace Solutions for backwards compatibility with old XF versions. Please change your code to use supported functionality.'. 'Public Overloads Function GetBusinessRules(si As SessionInfo, brType As BusinessRuleType) As List(Of BusinessRuleSummaryInfo)' is obsolete: 'This is a temporary function used by Marketplace Solutions for backwards compatibility with old XF versions. Please change your code to use supported functionality.'. Public Overloads Sub DeleteBusinessRule(si As SessionInfo, brType As BusinessRuleType, brName As String)' is obsolete: 'This is a temporary function used by Marketplace Solutions for backwards compatibil
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.