GetDataBufferUsingFormula
Can someone check if there's any mistake in the below 2 lines. I am unable to execute the BR Dim sourceBuff As DataBuffer Dim srcED As String = args.CustomCalculateArgs.NameValuePairs("sourceEffectiveDate") Dim selectedScenario = args.CustomCalculateArgs.NameValuePairs("selectedScenario") Dim dmTime = api.Pov.Time.Name Dim account = args.CustomCalculateArgs.NameValuePairs("account") sourceBuff = api.Data.GetDataBufferUsingFormula($"FilterMembers(T#{dmTime}:S#{selectedScenario}:U4#Approved_Status:U6#Total_Audit:U7#{srcED}, [A#{account}.Base])")16Views0likes0CommentsHelp with event handlers
Hi I am trying to understand the event handlers to see if we can leverage them to improve user experience and put some controls around recurring issues. But the documentation is not helping. I think I figured the events in general and when they execute but can someone please explain the purpose of "Is Before Event", "Can Cancel", and "args.Inputs(x)" Thank you in advance, PMSolved188Views0likes3CommentsRun a DM as a different user
Hi there, We have one Business Rule that reorganize some security groups adding/removing Parent Groups based on a certain hierarchy, however, we are facing the issue that when the user executing this Business Rule belongs to a group that is being reorganized, we get the following error message: "Security Access Error. You cannot add/remove yourself or a group that you belong to or an Administrators group to/from the current group." That error is perfectly reasonable, but we need to find a way to bypass that. In other softwares exists the possibility to execute a Job as a different user (usually non-interactive) which has the required security configuration to ensure the process is executed successfully. How can we achive that same result in OneStream? Thank you! Bests,69Views0likes2CommentsIf Cell Amount is Blank Confirmation Rule
Hello, I'm writing a confirmation rule that is a specific few cells are blank or if these cells are not 0 that the confirmation rule passes. I got the 2nd part to work fine, but when the cells are blank I'm having an issue. Can someone help me with my code and what I might be missing or need to change? Dim EntityName As String = api.Pov.Entity.Name.ToString Dim WFYear As Integer = api.Time.GetYearFromId(api.Pov.Time.MemberId) ' Retrieve amounts for each account Dim AccountPPEICSaleAmount As Decimal = api.Data.GetDataCell("Cb#Consol:C#Local:S#Actual:V#Periodic:A#0710:F#PPE_ICSale:O#BeforeAdj:I#None:U1#00:U2#DEF:U3#L_UNA:U4#None:U5#None:U6#None:U7#USGAAP_FORM:U8#None").cellAmount Dim AccountADICSaleAmount As Decimal = api.Data.GetDataCell("Cb#Consol:C#Local:S#Actual:V#Periodic:A#0771:F#AD_ICSale:O#BeforeAdj:I#None:U1#00:U2#DEF:U3#L_UNA:U4#None:U5#None:U6#None:U7#USGAAP_FORM:U8#None").cellAmount Dim AccountPPEICProceedAmount As Decimal = api.Data.GetDataCell("Cb#Consol:C#Local:S#Actual:V#Periodic:A#0710:F#PPE_ICProceed:O#BeforeAdj:I#None:U1#00:U2#DEF:U3#L_UNA:U4#None:U5#None:U6#None:U7#USGAAP_FORM:U8#None").cellAmount 'Check if data is real data If AccountPPEICSaleAmount = "" AndAlso AccountADICSaleAmount = "" AndAlso AccountPPEICProceedAmount = "" Then args.ConfirmationRuleArgs.DisplayValue = (AccountPPEICSaleAmount + AccountADICSaleAmount + AccountPPEICProceedAmount) Return True ' Check if all three amounts are non-zero ElseIf AccountPPEICSaleAmount <> 0 AndAlso AccountADICSaleAmount <> 0 AndAlso AccountPPEICProceedAmount <> 0 Then ' Set the DisplayValue to a meaningful string for reporting purposes args.ConfirmationRuleArgs.DisplayValue = (AccountPPEICSaleAmount + AccountADICSaleAmount + AccountPPEICProceedAmount) Return True Else ' Indicate which accounts are zero (optional for debugging) args.ConfirmationRuleArgs.DisplayValue = (AccountPPEICSaleAmount + AccountADICSaleAmount + AccountPPEICProceedAmount) End If Thanks, WillSolved55Views0likes2CommentsCreating FXRateType by BR
Is there a way to create a FXRateType from a Business rule? FXRate types (average rate, closing rate...) are used to set FX rates in addition to Time, source and destination currencies. In addition to default FXRate types, new ones can be added: Is it possible to create such FXRate types by business rule? Indeed, by business rule (with BRAPI.Finance.MemberAdmin.SaveMemberInfo), we can create a scenario, set parameters, set an existing FXRateType for P&L and for BS, but I've not found how to create a new FXRateType that could be used for this scenario.44Views0likes0CommentsAudit report available to show changes in business rules?
Hi all! I know there's a Business Rule - Updated audit report but it doesn't actually show the changes in the BR, just reports on whether a rule changed in a date range. Is there anything out-of-the-box that I'm missing? I know the database table shows the rule code every time it changes but it's annoying to copy/paste and find the differences, especially the way the database table shows/resizes with giant rows to accommodate the whole script. Any guidance will be helpful! Thanks!Solved97Views0likes4CommentsDynamic calc
Dynamic calc formula for an account Dim RATE As DataCell = api.Data.GetDataCell("A#RATE:F#99:U7#Top") Dim CALC As DataCell = api.Data.GetDataCell("A#CALC:F#F99:U7#Top") If api.Pov.Entity.Name <> "None" And api.Entity.HasChildren() Then If RATE.CellAmount < 0.15 api.Data.Calculate("RATE = 0.15 * RemoveZeros(CALC)") Return RATE Else Return 0 End If End If i'm calling A#RATE from the cube view. i have error unable to execute the formula for member RATE, error in processing script. when i compile the formula no issueSolved76Views0likes1CommentWhat IMPORT should i use for the SECURITY updates for BRApi
Hi All, i am new to OneStream, i tried creating BR for Security automation. below is my entire code in OS-BR. Imports System Imports System.Collections.Generic Imports System.Data Imports System.Data.Common Imports System.Globalization Imports System.IO Imports System.Linq Imports Microsoft.VisualBasic Imports OneStream.Finance.Database Imports OneStream.Finance.Engine Imports OneStream.Shared.Common Imports OneStream.Shared.Database Imports OneStream.Shared.Engine Imports OneStream.Shared.Wcf Imports OneStream.Stage.Database Imports OneStream.Stage.Engine Namespace OneStream.BusinessRule.Finance.BR_UserManagement Public Class SecurityGroupHelper Public Sub ShowQAGroups(ByVal si As SessionInfo, ByVal api As FinanceRulesApi) Try ' Get all security groups using the API passed to the function Dim allGroups As GroupInfo = BRApi.Security.Admin.GetGroup(si, "QA_Admin") ' Loop through all groups and display a MessageBox for each that starts with "QA_" For Each grp As MemberInfo In allGroups If grp.Member.Name.StartsWith("QA_") Then MessageBox.Show(grp.Member.Name, "QA Group Found") End If Next Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Sub End Class End Namespace --------------------------------------------------------------------------------------- I am getting error as below. i am not sure what mistake in the code. one i am sure about messagebox.show. Error compiling Business Rule 'BR_UserManagement'. 1) Error at line 27: Expression is of type 'GroupInfo', which is not a collection type. 2) Error at line 29: 'MessageBox' is not declared. It may be inaccessible due to its protection level.96Views0likes5Comments