Discuss formulas and business rules for your application.
Recently active
Hello All, Could someone guide on how a system business rule is triggered? As part of automating some daily tasks, we intend to automate addition, deletion of metadata members through a system business rule. Is the process similar to triggering extender rules? Any leads would be appreciated. Thanks
Statement: I can run any business rule in the business rules section in order to test it. Question Credit: Chris Bielinski Is this statement fact or fiction? Comment your best guess below! Answers will be revealed in one week. * This question is applicable to Platform 7.3.0 and may not be relevant to future releases
Hi All, in OneStream 6.x some functions in Business Rules became Obsolete. One of them is the BRApi.Database.GetCustomDataTable where the initial script required a string as CriteriaExpression but now it requires a list of dbWheres. That part I fixed. There are also functions that are not available anymore like: 1) Warning at line 418: '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.'. The SubstitutionVariablesHelper is not available anymore. Has anyone an alternative to this function (often used in MarketPlace solutions)? 'Create DBConn Infos (Only Used for EngineIfStatement Expression Processing) Using dbConnFW As DbConnInfo = BRApi.Database.CreateFrameworkDbConnInfo(si) Using dbCon
Hi, this might sounds like a stupid question to the more experienced people in the community, but how do I refer to the workflow variables from within an extensibility business rule? These 2 lines of code are of course not working: Dim sScenario As String = |WFScenario|Dim sTime As String = |WFTime| Any hint? Thank you
Hello- I have created a business rule that uses a buffer to bring back UD1 members that have a value against them, then they are added to a list like this: myList.Add(api.Members.GetMember(DimType.UD1.Id, curUD1)) Later on in my code I do a sort Ascending, and return the results back to a cube view: objMembers = (From member In myList Order By Member.Name Ascending Select Member).ToList() I'm encountering a problem with duplicate values in the results. This is because a small number of UD1 members have activity booked against them across more than one of the entities I am processing. Are there any quick solutions to removes the duplicates in the add to list or sort steps? The only thing I can think of would be to check if the value exists in the list before I add it, but that would require more coding. Thanks
I've extracted the formula file for all metadata formulas, and have notepad++ installed as my preferred tool for reviewing. What language settings in Notepad++ do I need to use in order to replicate the colour and formatting of OneStream's internal formula editor?
I am passing 2 Entities in the Data unit for Calculation as Entity is different in both the destinations So what i was expecting is that it will run as a for each loop with both the entities so it will pick enitity1 and then run the Calc and then enitity2 and then run the Calc what i was expecting was that the order will remain same every time it will run that is Enitity1 then Enitity2 but what is happening is that it is first taking enitity1 and then entity2 but when i run it again it is taking enitity2 and then enitity1 in that for each loop to solve this i used 2 different DM steps but why it is running like this i want to know Can anyone explain why it is running like this ?
Happy end of masking!! We are trying to pass multiple months to: wfClusterPkChild We tried to pass Qtr1.base but we get error message. Any suggestions on how to pass M1, M2 , M3 - which are base level children of Qtr1 ? Here's our code: wfClusterPk = BRAPi.Workflow.General.GetWorkflowUnitClusterPk(si, profileName, scenarioName, timeName) where timename is 2022M1 Dim wfClusterPkChild As New WorkflowUnitClusterPk(profileInfo.ProfileKey, wfClusterPk.ScenarioKey, wfClusterPk.TimeKey) --- where timename is 2022M1 - it works great. However, when we tried to make timename = Qtr1.base, we get error message. When we try to display using wfClusterPkChild.ToString, we see this "ProfileKey (ffb8c7f5-2cc0-48bb-b483-a2c81cb84875), ScenarioKey (0), TimeKey (2022003000" wfClusterPkChild= ProfileKey (ffb8c7f5-2cc0-48bb-b483-a2c81cb84875), ScenarioKey (0), TimeKey (2022003000), wfClusterPk.TimeKey = 2022003000
Statement: A parser business rule is commonly used with a data source Question Credit: Chris Bielinski Is this statement fact or fiction? Comment your best guess below! Answers will be revealed in one week. * This question is applicable to Platform 7.3.0 and may not be relevant to future releases Want more Fact or Fiction? We’ll be hosting a LIVE game show at SPLASH San Antonio! Come participate or you’re welcome to attend. Secure you spot today by contacting Press@OneStreamSoftware.com. We hope to see you there!
OneStream is the best EPM app for consolidation and everything planning - it is going to kill Hyperion / Essbase !!Does anyone have a sample business rule BR for a column (e.g. K) to Accumulate what is in another column (in Cubeview)?I probably have a written something similar long time ago, but would like to see if someone else wrote a better BR.
Hi All - I am trying to copy Base accounts from Actual to Plan Scenario but it is not working when I try to consolidate but it is working when I perform force consolidate. Below is the code and any help would be appreciated. If ((Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyforEntity())) ThenIf api.Pov.Scenario.Name = "Plan" Thenapi.Data.Calculate("S#Plan = Eval(S#Actual:O#Top:I#Top:U1#Total_CostCenter:U2#Total_ProfitCenter)","A#[Corp_US_Sales].Base",,,,,,,,,,,,AddressOf OnEvalDataBufferScrFilter)Brapi.ErrorLog.LogMessage(si,"APIDATA") End IfEnd If Private Sub OnEvalDataBufferScrFilter(ByVal api As FinanceRulesApi, ByVal evalName As String, ByVal eventArgs As EvalDataBufferEventArgs)TryeventArgs.DataBufferResult.DataBufferCells.Clear()For Each sourceCell As DataBufferCell In eventArgs.DataBuffer1.DataBufferCells.Values'Only process cells that have dataIf (Not sourceCell.CellStatus.IsNoData) Then'Apply filtered source cells with data as the new Data Buffer CellsDim
Hi experts, The business users had posted some retained earnings adjustments to both base and parent entities at OwnerPostAdj consolidation level. I have a very simple opening balance rule that works across all entities and consolidation levels: api.Data.Calculate("F#100= RemoveZeros(F#EndBal:T#PovPriorYearM12)","A#<balance sheet accounts>.Base") We are seeing that the opening balance (F#100) member is correctly pulling the OwnerPostAdj numbers for the base entities from prior years, but is not bringing in the opening balance from the parent entities at OwnerPostAdj level. I did a 'Force calculate with logging' and see that the 'ReadDataRecordsinDataUnit' step is showing zero records in the database. However, I can confirm that the journal was posted in M12 at the parent entity and C#OwnerPostAdj level. Any suggestions as to what else I might need to check? Regards, S
Hi, sorry for such a small issue but hoping to get a quick second look. I input the following to calculate BW percent but the following screenshot with the error keeps coming up, despite the comma I put in. Would anyone know what could be wrong with the syntax? GetDataCell("BWPercent(S#Working:V#QTD:T#QuarterNext1(|CVTime|),S#Budget:V#QTD:T#QuarterNext1(|CVTime|))"):Name(Var %) Thank you
Hi all What is the globals object good for we are seeing in all the business rules?
Hi all, We have a simple copy calculation on a forecast scenario that copies in the actuals data for certain periods, defined in a text field. We've had it for years and it generally works fine with no issues. This quarter though, I'm having an odd issue. There are a handful of intersections that are copying only USD values, but not local values and I cannot for the life of me figure out why. ANY suggestions or thoughts on what to review would be helpful! Here's the calc on the scenario for reference: Text2 field is 3 (technically "Firstforecastmonth=3") on the scenario and I'm looking at M1. There are about five accounts (out of hundreds) that are off, but inconsistently so there's not one specific piece of master data that seems to be driving the issue. Exchange rates are loaded and the entity with the issues is a CAD local entity that's translated into USD. The part that's truly baffling is that it's only copying in the USD value - here's an example
I have created an extender BR to load from a xlsx file with xft named range into a custom table. The file is in the OS cloud fileshare in a specific folder. I am 100% sure the file is set up correctly and the path is not an issue, however I still keep getting an error when running the BR from data management that file is invalid or missing. Can someone please help. Below is the BR . What am i missing Dim fileName As String = "XFD_Plan1.xlsx" '<-- Enter name of Excel fileDim filePath As String = "Applications\OneStreamDevelopment\Batch\Harvest\" '<-- Enter path to Excel file'Note: dbLocation, TableName, LoadMethod & Field names defined in header of each excel "xft" range.BRApi.Utilities.LoadCustomTableUsingExcel(si, SourceDataOriginTypes.FromFileShare, filePath & fileName, Nothing)
Hello, I have a use case where I need to get data from siblings (or parents) for a dynamic calc. Entities A,B are part of the same parent EntityC. Cost1 / Entity A : 1000 Cost1 / Entity B : 500 Cost2 / Entity A : 2000 Cost2 / Entity B : 1000 The calculation of the KPI should be as follow for each entity : (0.5*Cost1 + Cost2) / ( 0.5*Cost1:EntityC + Cost1:EntityC). or : (0.5*Cost1 + Cost2) / ( 0.5*Cost1:EntityA+EntityB + Cost1:EntityA+EntityB). (it's the same really) Just to give more fun to it, this formula should be dynamic, as I have multiple entities and multiple parent... I'm looking for a formula that would help me achieve this ? Regards,
Does anyone has a NotePad++ language definition file for OneStream rules? Thanks in advance.
Hello Everyone, Looking for a quick help Please. Here I am trying to write a Dynamic Calculation code which will follow the exact logic of PVA translation however will use rates from previous year. So kind of a Constant currency solution. However when I am in Time period 2, I am unable to pull data from different periods, This calculation works If I make my T#Hardcoded e.g. 2020M1/2020M2. Current outcome is all zeros 😞 Please help with any solution anyone has or can point me to right direction - since unable to understand what is missing. Thanks Satish
Hi all, I have a dynamic calc that displays zeros instead of null when the source cell is null. In the image below, MTD_CF is dynamic and it shall display None data under certain conditions. When None is null, MTD_CF is showing 0. Is there a way to avoid this so the dynamic calc shows nulls as well? I've tried with RemoveZeros, like this: Return api.Data.GetDataCell("RemoveZeros(V#" & view & ":U1#None)").CellAmount The code returns the result, but does not remove the zeros. Any ideas? Thanks in advance. GSF
Hi all Onestream stores a lot of information using an integer ID instead of a name. And most of the time we also deliver a simple way, to get objects (or names of objects) using an api or brapi call. Somehow getting the name of a dimension from its ID is an exception. Is there a simple way to do it? Cheers
Hello Experts, I am trying to export Cell Details to a CSV using a business rule function as shown below: If args.CustomCalculateArgs.FunctionName.XFEqualsIgnoreCase("Export_CellDetails_CSV") Then Dim wfUnitInfo As WorkflowUnitInfo = api.Workflow.GetWorkflowUnitInfo() Dim SRCTimeName As String = wfUnitInfo.TimeName Dim configSettings As AppServerConfigSettings = AppServerConfig.GetSettings(si) Dim timeStamp As DateTime = DateTime.Now '.UtcNow Dim AESTNow = System.TimeZoneInfo.ConvertTime(timeStamp, TimeZoneInfo.FindSystemTimeZoneById("AUS Eastern Standard Time")) Dim timeString As String = AESTNow.ToString("yyyy_MM_dd_HHmm") Dim xfolderPath As String = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp(si, True, configSettings.fileShareRootFolder, si.AppToken.AppName) Dim csvFilePath As String = xfolderPath & "\" & "Cell_Details.csv" If File.Exists(csvFilePath) Then File.Delete(csvFilePath) End If
Hello, I am working on a CTA plug account and also historical overrides. Right now for the plug and overrides to run I have to force calculate and translate. Is there a way the user would be able to run the consoldiation and the formulas run correctly without having to go through a whole sequence of steps? Basically, is there an easier way to run the translation logic within consolidation? These are the current formulas I have: CTA Plug with formula pass 8 being used: If (api.Cons.IsCurrency() And Not api.Cons.IsLocalCurrencyforEntity()) ThenDim entityDimPk As DimPk = api.Pov.EntityDim.DimPk Dim entityId As Integer = api.Pov.Entity.MemberPk.MemberId If Not api.Members.HasChildren(entityDimPk, entityId, Nothing) Then api.data.calculate("A#313001:F#TB_ENDBAL:I#None = A#TotalAssets:F#TOT_USGAAP:I#Top - A#TOTALLIABEQUITY:F#TOT_USGAAP:I#Top") End If End If and for overrides I only have one formula being used for “Historical Override Prior” on Formula pass 1. I think this may be part
Source: Migrated from Champions Hello all, I’m creating a Data Adapter that is using SQL to poll an external database. I can get it to work when I’m just supplying the strings for dates. However, I wanted to get fancy and be able to parse the effective dates using variables. When I go to an online SQL tester (https://www.w3schools.com/sql/trysqlserver.asp?filename=trysql_func_sqlserver_left), I can get the below code to return ‘121181’, which is the Julian date I need in querying JDE. But the OS SQL Query returns an error saying ‘int’ is an invalid token. does anyone know if there’s a way to use variables in this way? Declare @YearRun intDeclare @YearPart intDeclare @MonthRun intDeclare @Global varchar(100)Declare @GetTime datetimeDeclare @RunTime varchar(100)Set @Global = ‘2021M6’set @YearRun = LEFT(@Global, 4)Set @YearPart = Right(@YearRun,2)set @MonthRun = Right(@Global, Len(@Global)-CHARINDEX(‘M’,@Global))Set @GetTime = EOMONTH(CONCAT(@MonthRun, ‘/’, 1, ‘/’, @YearRun))S
Hi all How can I avoid the ampersand in string operations? I need to concatenate a pov for a calculation, but with all the ampersands, it looks complicated: "A#" & accountName & ":F#" & flowName & ":UD2#" & ud2Name & ":UD4#" & ud4Name
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.