Recent Discussions
Perform a Translate within a Calculate when copying information.
In a calculation, I'm copying data from one scenario to another. I have no issues with the amounts in local currency, but with the USD currency I do, because it retains the same value as the scenario I'm copying to, instead of the value it should actually have. Dim TimeName As String = BRApi.Finance.Time.GetNameFromId(si, si.WorkflowClusterPk.TimeKey) Dim entity As String = api.Pov.Entity.Name Dim index As Integer = TimeName.indexOf("M") Dim monthNumber As String = TimeName.Substring(index + 1) '1 'api.Data.ClearCalculatedData("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE",True,False,False,True) api.Data.ClearCalculatedData("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE",True,True,True,True) 'BRapi.ErrorLog.LogMessage(si,"Time: " & api.Pov.Time.Name & " entity: " & entity & " currency:" & api.Pov.Cons.Name) 'If ((Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyForEntity())) Then If api.Cons.IsLocalCurrencyForEntity() Then 'api.Data.Calculate("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE = RemoveZeros(FilterMembers(S#[Forecast " & TimeName & "],[A#Root.Base]))") api.Data.Calculate("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE = RemoveZeros(S#[Forecast " & TimeName & "])") api.Data.Translate(sourceDataBufferScript, destDataBufferScript, End If I use this code when consolidating the target scenario, so I'm not sure if I'm missing something in this section, since in theory the translation should happen automatically during consolidation. I appreciate any support you can give me.Marco5 hours agoContributor II12Views0likes0CommentsHelp 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!carbon8 hours agoNew Contributor10Views0likes1CommentBusiness 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 Ifcarbon2 days agoNew Contributor7Views0likes0Commentshelp with a conditional statement
Hello, I wrote a simple formula for Wip Rev that checks the amount in Earned Revenue (that is calculated too) and calculates the difference between its current value(POV) and prior year end value(POVPriorYearM12) - this part worked, but then I added a conditional statement saying that if Earned Revenue is zero then Wip Rev should be zero too else run the math (POV - POVPriorYearM12) and only first part works, but math doesn't. I tried a similar statement for the dynamic calc and I was successful, but here no. Please let me know if you can look at the statement and suggests what is wrong... thank youOlaWidera2 days agoNew Contributor II56Views0likes7CommentsSaveFileBytesToUserTempFolder returning an error message
Hi, I am trying to use the Business Rule API "SaveFileBytesToUserTempFolder" in order to open a file stored as a byte in a datatable. This is exactly like in the "Reporting Compliance" dashboard, where the file is stored as bytes in a datatable. I am actually using the exact same business rule ! However, there is an issue in my case. My business rule that is used to view the document works fine until the very last step... this is the one causing the error ( I have tested FileName and FileBytes fields and these exist) : BRApi.Utilities.SaveFileBytesToUserTempFolder(si, si.UserName, dt(0)("FileName"), dt(0)("FileBytes")) Error message : An error occurred while receiving the HTTP response to http://localhost:50002/OneStreamApp/SVC/XFFileSystem.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. The underlying connection was closed: An unexpected error occurred on a receive. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host (Socket Error Number 10054). The exact same file is used in Reporting Compliance and I can view it. Am I missing something ? I don't find any documentation on this function ... Regards,Sergey2 days agoContributor III4.4KViews0likes12CommentsHow to get the sum of multiple entities in a GetDataCell or in a Calculate
Hi Everyone. I want to get the sum of multiple entities, like in the example below, but for now I'm only getting errors or values with 0 'First option Dim strList As String = String.Join(", ", (From l In lstMI Select "" & l.Member.Name & "").ToArray()) Dim lstMI As List(Of MemberInfo) = BRapi.Finance.Members.GetMembersUsingFilter(si, api.Pov.EntityDim.DimPk, "E#Kazakhstan.Base.Where(Text1 = 'M_S_KAZAKHSTAN')", True) api.Data.GetDataCell("A#411000:E#Root.list([" & strList &"]):C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS").CellAmount 'Second Option api.Data.GetDataCell("A#411000:E#Kazakhstan.Base.Where(Text1 = 'M_S_KAZAKHSTAN'):C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS").CellAmount What I ultimately want to do is to get those values so I can change the following, so that the entity includes all those base entities that meet the filter, and I can get the correct value and use it in my Calculate. Dim DBICtry As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(A#RETBUYBACK:E#" & strEntTx3 & ":C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS + A#423100:E#" & strEntTx3 & ":C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS + A#411000:E#" & strEntTx3 & ":C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS)") api.Data.FormulaVariables.SetDataBufferVariable("DBICtry",DBICtry,False) api.Data.Calculate("A#P_EBIPrct:O#Import:U1#D0000:U2#P0000:U3#LOCAL_DATA:U4#PJ00000 = Divide($DBICtry, A#411000:E#" & strEntTx3 & ":C#Local:O#Top:U1#ALL_DEPARTMENTS:U2#INNER:U3#COUNTRY_RPT:U4#ALL_PROJECTS)") Thanks for your help and I appreciate the help.Marco3 days agoContributor II35Views0likes4CommentsGet list of base members where text = in vb
I am having difficulties getting either the member ID or member name into a list using GetMembersUsingFilter. I have got this so far. Dim members As List(Of MemberInfo) = api.Members.GetMembersUsingFilter(api.Pov.AccountDim.DimPk, "A#BalanceSheet.Base.Where(Text2 = RF_Debt)", Nothing) However, this gives me neither the member ID or member name.Samwise3 days agoNew Contributor II18Views0likes1CommentPublic 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.BobNelson3 days agoNew Contributor III26Views0likes1CommentUsing the Trailing3MonthAvg View Member in a Data Buffer Across Years
Hello, I was wondering if anyone has had any success using Trailing3MonthAvg View member within a data buffer when the trailing 3 months cross over years. When I run this for a period like June everything works great, but when I run this in Jan or Feb I get the object reference not set to an instance of an object error. When switching the View member to YTD everything works fine. Below is an example of the code. Thanks!! Dim filter1 As String = "U1#XXXXX.Base" Dim filter2 As String = "U6#XXXXXBase" Dim U2 As String = "XXXXX" Dim test1 As String= "Cb#XXXXXX:T#2023M1:A#Direct_HC:S#Actual:E#XXXXX:F#EndBal_Input:V#Trailing3MonthAvg:O#BeforeAdj:I#None:U3#Top:U4#Top:U5#Total_Adj_Alloc:U2#" _ & U2 & ":U7#Top:U8#None" Dim test As DataBuffer = api.Data.GetDataBufferUsingFormula( _ "RemoveZeros(FilterMembers(" & test1 & ", " & filter1 & ", " & filter2 & "))",,True)BenEppel12 days agoNew Contributor III3.8KViews1like9CommentsCAT_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?uvrao3312 days agoNew Contributor II13Views0likes0Comments