Business Rule to Remove Base-Level Entities from a Parent Rollup Based on Keyword Match
Hi everyone, I'm working on a Business Rule in OneStream and could use some guidance. I’m trying to build a rule that targets a user-defined parent rollup within the Entity Dimension. The goal is to automatically remove the relationship between that rollup and any base-level child entities whose name or description contains a specific keyword — in this case, "YS". Here’s what I’m aiming for: The rule should accept a parent rollup name (e.g., Global_excl_YS) It should loop through all children of that rollup If a child is a base member and its name or description includes "YS", the rule should "remove the relationship" Parent or intermediate rollups should remain untouched I’m planning to implement this as an Extensibility Business Rule, but I’d love to hear if anyone has done something similar or has tips on best practices for metadata manipulation in this context. Thanks in advance! ' Define dimension and parent rollup as parameters or hardcode here Dim EntityDimPK As DimPk = BRApi.Finance.Dim.GetDimPk(si, "MgmtEntity") Dim RollupName As String = "Global_excl_YS" Dim RollupMember As Member = BRApi.Finance.Members.GetMember(si, dimtype.Entity.Id, RollupName) ' Get all direct children of the rollup Dim Children As List(Of Member) = BRApi.Finance.Members.GetChildren(si, EntityDimPK, RollupMember.MemberId, Nothing) Dim RemovedEntities As New List(Of String) For Each ChildMember As Member In Children Dim ChildName As String = ChildMember.Name Dim ChildDesc As String = If(ChildMember.Description, "") ' Check if base (no children) Dim HasChildren As Boolean = BRApi.Finance.Members.HasChildren(si, EntityDimPK, ChildMember.MemberId, Nothing) If Not HasChildren Then ' Check if "YS" in name or description If ChildName.ToUpper().Contains("YS") Or ChildDesc.ToUpper().Contains("YS") Then ' Remove Relationship End If End If Next If RemovedEntities.Count = 0 Then Return "No base children with 'YS' found under " & RollupName Else Return "Removed from " & RollupName & ": " & String.Join(", ", RemovedEntities) End If5Views0likes0CommentsPublic Overloads Function GetBusinessRules
I have seen several MaketPlace solutions rules that give me a warning message when I compile in v 7.1.1. See the example below: Warning at line 410: '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.'. Not sure how these rules will behave when we upgrade to v 8.5, but I was wondering if there is an easy fix out there which will remove this warning message.26Views0likes1CommentCAT_executeCopy rule
Hi, In our application, we uninstalled and re-installed Cloud Administration Tool, after did this trying to compile CAT_executeCopy while doing this getting validation errors. My concern is after uninstall CAT, is it mandatory clear CAT_executeCopy rule as well?13Views0likes0CommentsIs it possible to retrieve values of additional options from the data management export step?
Hi OneStream Experts, Is it possible to extract the value of "options" from the data management export data step using a extensibility rule? I used a syntax above to retrieve it. but, unfortunately no luck. Any help or suggestions are much appreciated. Thank you.Solved39Views0likes5CommentsFdxExecuteCubeView cannot export dynamic calculations in V#Annotation
Hi All, I'm working with FdxExecuteCubeView and cannot export the dynamic calculations in V#Annotation even though I have includeCellTextCols as True. The OS documentation also says that it's possible to extract Dynamic Calc results. In my CubeView I have a dynamic UD8 which returns the value kilogram in this case: Here's the code I have right now: Dim nameValuePairs As New NameValueFormatBuilder(String.Empty,customParams,False) Dim filter As New System.Text.StringBuilder Dim parallelQueryCount As Integer = 8 Dim logStatistics As Boolean = False Dim includeCellTextCols As Boolean = True Dim useStandarFactTableFields As Boolean = False Dim dt As New DataTable dt = BRApi.Import.Data.FdxExecuteCubeView(si, cubeViewFilter, "","","","","", nameValuePairs, includeCellTextCols, useStandarFactTableFields, filter.ToString, parallelQueryCount, logStatistics) Return dt And the resulting data table shows 0.0 instead of kilogram: Am I missing something here? Thanks for the help!55Views0likes4CommentsGetting Column Text Value from Derivative Rule
Hi I have a derivate rule that I created that returns the absolute value of an amount based on column name. The column names are assigned in the data source and based on the data source column it will either assign an absolute value or a negative value. I want to be able to pull a column in my derivate rule that is a text attribute column and if the text equals something like "S5" it will do some type of conditional logic. With my limited experience with derivative rules and research it seems this cannot be done via a derivative rule. First question: Is there a way for me to do this? Second: If not, is there another alternative way that I can extract the text field of a column and based on that to do some type of additional logic?22Views0likes1CommentIs it possible to extract(as xml) a Maintenance Unit and it's components using extensibility rule?
Hello OneStream experts, We are trying to extract a maintenance unit and all it's components underneath it using a BR/Extensibility rule with the latest OS version - 9.0.1. But, however after the run we could able to see a empty xml in the fileshare folder. Below is the snippet of code which we are using. Any suggestions or help would be greatly appreciated. Thanks! Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As ExtenderArgs) As Object Try Select Case args.FunctionType Case Is = ExtenderFunctionType.ExecuteDataMgmtBusinessRuleStep, ExtenderFunctionType.Unknown 'Get Configuration Settings Dim configSettings As AppServerConfigSettings = AppServerConfig.GetSettings(si) 'Data Management extract location Dim folderPath As String = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp(si, True, configSettings.FileShareRootFolder, si.AppToken.AppName ) & "\" & DateTime.UtcNow.ToString("yyyyMMdd") & "\Extracts" 'If the directory does not exist create If Not Directory.Exists(folderPath) Then Directory.CreateDirectory(folderPath) 'Full path and file name for extract Dim filePath As String = folderPath & "\MaintainanceUnitBkp " & DateTime.UtcNow.ToString("yyyyMMdd") & ".xml" 'If file already exist If File.Exists(filePath) Then File.Delete(filePath) 'Extract Options ' Dim xmlOptions As New XmlExtractOptions ' xmlOptions.ExtractAllItems = False Dim xmlOptions As New XmlExtractOptions Dim dashboardOptions As New DashboardMaintUnit xmlOptions.ExtractAllItems = False 'Extract Maintainance Unit Dim extractDict As New Dictionary(Of XmlExtractItemPk, Boolean) Dim strMaintUnit As String = "DataExtract_Main" 'Maintenance Unit extractDict.Add(New XmlExtractItemPk(XmlExtractItemType.DashboardMaintUnit, strMaintUnit), True) 'Execute the Metadata Extract Using dbConnFW As DbConnInfo = BRApi.Database.CreateFrameworkDbConnInfo(si) Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si) 'Extract XML metadata to target location File.WriteAllText(filePath, MetadataExtract.ExtractXml(dbConnFW, dbConnApp, xmlOptions, extractDict)) File.WriteAllText(filePath,XmlExtractController.ExtractXML(dbConnFW,dbConnApp,Nothing,xmlOptions,extractDict,XmlLoadExtractType.ApplicationWorkspaces)) End Using End UsingSolved69Views0likes4CommentsExecute Custom Calculate BusinessRule - Server Timout
Dear community, We are using a Dashboard Extender Rule to trigger a ExecuteCustomCalculateBusinessRule. The business rule that we are running is a finance business rule that contains databuffer formula's. Since we can only run a finance business rule for one entity, we have created a MemberList that is running the Finance Rule each time for one of the 1500 legal entities that we have. This caused a Server Timer Out error. Do you know if the ExecuteCustomCalculateBusinessRule runs for each entity separately or for multiple entities in Parallel that is causing this TimeOut?28Views0likes3CommentsHow to pull a field from Custom table into a Cube view
Hi Everyone, I have a requirement to pull the data in a particular format in my cube view. I have entity dimension members in a row which gets pulled from the cube. I have to pull the respective opening dates of the stores from the custom table in the cube view as a column. I have created the custom table (with store and opening date) and used a business rule to pull the opening date from the custom table. Now I want to display this in the cube view w.r.t the stores we are pulling in rows. For ex if we have a row with Entity (store) tx0001 in the cube view which has an opening date for the store in the custom table. This opening date needs to be displayed in the column w.r.t to the store in the row. How to achieve this? Thanks, Jeevan37Views0likes3CommentsHow to stop a BR from updating a Certified Entity
We have a Fcst BR that copies from a support scenario into our main Fcst Scenario. Our issue is that it will still overwrite data in the main scenario even when that scenario's Entity is certified. How do I prevent BR's form updating data that is certified. We had closed/certified our Fcst and then someone not aware was in a form that allowed them to update this supporting details scenario and saved which then updated the Fcst scenario. Is this something that can be managed on the Scenario setup - ie not allowing changes when certified or is this a type of loophole with BR's I have something similar I do for data loads where I check the status of the WF before running an automated Import/Validate/.../load process. in this case I am trying to prevent a ton of error messages when it gets to the load steps and finds the entity is certified. Would there be logic that could check the status of an Entity vs. WF that I might be able to insert into my BR.27Views0likes2Comments