C# - is it now widely used for BRs?
1) Is C# now widely used for Business Rules? 2) Is there any plan to support C# in member formulas? 3) For those who moved their business rules from vb.net to C# - why you did it and what benefits you get out of it? 4) In OneStream - is there anything that one can do in vb.net but can't in C#? If so, what are they? Thanks in advance for sharing your experience.Solved122Views0likes5CommentsUnable to set the CreditAmount in JournalLineItem for journals created with Business Rule
I can't seem to figure out why the CreditAmount in the JournalLineItem isn't reflecting the number that I assign to it. It's always zero no matter what. Is anyone experiencing this issue? see my code below. Sub CreateJournal(ByVal si As SessionInfo) Try 'Set up a new journal header. Dim journalObjectHeader As New JournalHeader() With journalObjectHeader .Name = "Test_Journal" .Description = "This is a test journal" .WorkflowProfileID = si.WorkflowClusterPk.ProfileKey .MemberIds.Scenario = si.WorkflowClusterPk.ScenarioKey .MemberIds.Time = si.WorkflowClusterPk.TimeKey .JournalStatus = JournalStatus.Working .IsSingleEntity = False End With Dim journalObjectLineItems As New List(Of JournalLineItem) 'Create the first journal line item Dim jnLineItem1 As New JournalLineItem With jnLineItem1 .EntityId = BRApi.Finance.Members.GetMemberId(si, DimType.Entity.Id, "100_US") .AccountId = BRApi.Finance.Members.GetMemberId(si, DimType.Account.Id, "10220030") .FlowId = BRApi.Finance.Members.GetMemberId(si,DimType.Flow.Id, "EndBal") .ICId= BRApi.Finance.Members.GetMemberId(si, DimType.IC.Id, "None") .DebitAmount.Amount = 150 End With journalObjectLineItems.Add(jnLineItem1) 'Create the 2nd journal line item Dim jnLineItem2 As New JournalLineItem With jnLineItem2 .EntityId = BRApi.Finance.Members.GetMemberId(si, DimType.Entity.Id, "100_US") .AccountId = BRApi.Finance.Members.GetMemberId(si, DimType.Account.Id, "10220050") .FlowId = BRApi.Finance.Members.GetMemberId(si,DimType.Flow.Id, "EndBal") .ICId= BRApi.Finance.Members.GetMemberId(si, DimType.IC.Id, "None") .CreditAmount.Amount = - 150 End With journalObjectLineItems.Add(jnLineItem2) 'Create a new journal object Dim journalObject As New Journal(journalObjectHeader, journalObjectLineItems) 'Save it BRApi.Journals.Metadata.SaveJournalOrTemplateUsingIds(si, journalObject,False, True) Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End SubSolved17Views0likes1CommentUse Data Adapter in a Different Workspace
I'm looking copy an existing data adapter (screenshot below) from the RCM solution into a different workspace and use it within BI Viewer for custom dashboards. I believe the 'GetReconsWithStatusGridView' function is stored within the 'Services' assembly folder and 'ReconService.cs' is the file within the folder that needs called. I have 'Is Shareable Workspace' set to True. Since the method query references WSMU, I need to update that in order to properly call the underlying business rule. That's the part I'm having trouble with. I've tried a wide variety of syntax to no avail. Examples: {Workspace.OFC.RCM}{GetReconsWithStatusGridView}{AccountFilter=...} {Workspace.OFC.RCM.Services}{GetReconsWithStatusGridView}{AccountFilter=...} {Workspace.OFC.RCM.Services.ReconService}{GetReconsWithStatusGridView}{AccountFilter=...} Does anyone know the proper syntax to place in my copied data adapter? Are there any other steps I need to take to properly reference this business rule? Thanks!31Views0likes0CommentsBusiness 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 If23Views0likes1CommentGetting WF Profile Status in BR and using it in Cube View
Hello, is there a BR function where I can get a Workflow Status (example "Pre-Process Completed, Locked")? When I am using brapi.Workflow.Status.GetWorkflowStatus I only get UniqueId and Name. I want to use the status in a Cube View to display for users. Thank you!Solved482Views0likes4CommentsHelp Understanding "relationshipPks As List(Of RelationshipPk)" in Relationship Removal
Hi everyone — I could use a bit of guidance. I'm working on a function to remove a member's relationship, and I'm stuck on how to properly call relationshipPks As List(Of RelationshipPk). I'm not entirely sure what this parameter represents or how to construct the list it expects. What does RelationshipPk refer to in this context? How should I build the List(Of RelationshipPk) to pass into the method? Any examples or explanations would be greatly appreciated. Thanks in advance!17Views0likes1CommentGetting 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?28Views0likes1CommentHow 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, Jeevan57Views0likes3CommentsEntity Parent Business Rules not working
I using UD8 to call master data of entity. Other master data is work, but there is issue when I call entity parent. Seem like the business rules is not working. Not sure where the missing part. If api.View.IsAnnotationType() Then ' Dim EntityID As Integer = api.Pov.Entity.MemberId ' 'Return the Account name setting for this text-based View member '' Return api.Entity.GetLocalCurrency(EntityID).Name ' 'Dim ParentId As Integer = api.Pov.Parent.MemberId '' return api.Entity.par ''Return api.Pov.Parent.MemberId.ToString 'Dim objList As = BRApi.Finance.Members.GetParents(si, dimPk, entity, includeRootMemberInResult, dimDisplayOptions) 'Dim oblist2 = BRApi.Finance.Members.GetParents() 'Dim ParentId As Integer = api.Pov.Parent.MemberId ' Dim ParentName As String = api.Members.GetMemberName(DimType.Entity.Id,ParentId) 'Return ParentName 'Else ' 'Return a NoData Datacell ' Return api.Data.CreateDataCellObject(0.0,True, False) End If36Views0likes0Comments