Recent Discussions
Create a parameter to determine the initialization status of each forecast?
Hello everyone, We have set up a monthly forecast that is compared to the budget or actual figures in different cube views. We currently use a parameter to select the forecast month in each cube view, but I would like to remove it and have the latest forecast for the year or year N-1 displayed automatically. I have created an XFBR that retrieves the holding company's turnover for each of the 11 forecasts (January, February, etc., November) and displays the forecast closest to December with a turnover. The problem is that not all users have access to this company, so the BR does not work for them. I could change the BR to add companies to it so that it works for all users, but I find that cumbersome. Is it possible to save a value (X or 1) in a variable when initializing the forecast so that the BR can query this variable based on the Time scenario and thus know which forecast has been initialized? How do you do this in your OS?JérémyRenard2 days agoNew Contributor29Views0likes2CommentsCalculation in Scenario member
I am trying to calculate Average Percent Period Movement (AVPPM) — i.e.: AVPPM=Actuals(Current)−Actuals(Prior Period) / ∣Actuals(Prior Period)∣×100 = and store the result in S#AVPPM for the current POV. I tried using the below script in Business rule or Scenario member formula for S#AVPPM but not getting the correct result. api.Data.Calculate("S#AVPPM = (S#Actuals - (S#Actuals:T#POVPrior1)) / (ABS(S#Actuals:T#POVPrior1))*100", True) Appreciate any help!Harv2 days agoNew Contributor III27Views0likes2CommentsHow to export data out of BR
Hi All, I created a Business Rule to export all the GROUPS that i have in OS applciation. i try to export the data in a file. i tried below option , it did not work created BR and executed there as File output Created a Data Management Sequence and added 2 steps. 2 for BR and other for File Export. But my File export fails as NAME Empty Below is the error Error processing Data Management Step 'ExportGroups'. Name is empty. Below is the BR i used. 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.Extender.BRGetAllGroups_1 Public Class MainClass Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As ExtenderArgs) As Object Try ' Get all security groups Dim groupsObj As Object = BRApi.Security.Admin.GetGroups(si) Dim names As New List(Of String) If groupsObj Is Nothing Then names.Add("No security groups found") Else Dim enumerable = TryCast(groupsObj, System.Collections.IEnumerable) If enumerable IsNot Nothing Then For Each g In enumerable If g IsNot Nothing Then Dim name As String = g.ToString() If name <> "" AndAlso Not names.Contains(name) Then names.Add(name) End If End If Next End If End If ' FORMATTED OUTPUT FOR EASY VIEWING Dim output As New List(Of String) output.Add("=== SECURITY GROUPS LIST ===") output.Add("Generated: " & DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")) output.Add("") For Each name In names output.Add(name) Next output.Add("") output.Add("=== END OF LIST ===") output.Add("Total groups: " & names.Count.ToString()) Return output Catch ex As Exception Dim errorList As New List(Of String) errorList.Add("ERROR: " & ex.Message) errorList.Add("Generated: " & DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")) errorList.Add("=== END ===") Return errorList End Try End Function End Class End NamespaceSolvedDK_OS3 days agoNew Contributor34Views0likes3CommentsWhat 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.DK_OS4 days agoNew Contributor34Views0likes2CommentsFunction to get the workflow to which an entity is assinged?
Is there a function, or other method, to get the workflow an enitty is assigned to, if it is assigned? Seems like an there should be an api for this but for the life of me I can not find it. Thanks in advance.SolvedSweez5 days agoContributor39Views0likes1Commenttask manager comments - how to notify users by email
Hello, We are implementing the task manager and one of the requests is for the users to be able to know when comment is added. Is there a way to build business rules so email is sent when comment in TM is added. If someone already has it would you be willing to share it? thank you, OlaOlaWidera8 days agoNew Contributor II15Views0likes0CommentsFinding a user connection type in Business Rules
Hello, We are trying to find the best way to determine if a user is using web-based or Windows App OneStream environments to customize a dashboard experience. For now, we are using the si.WebServerURLByClient to determine this which works but seems a bit clunky. Is there a better call to determine which environment a user is in? Thanks in advance. BrettSolvedbsalamone12 days agoNew Contributor II32Views0likes2Commentsaccount is not translating
Good afternoon, I need help with translating a balance account. We set it up to calculate job to date and load its local currency value, then I wanted to translate it using a job to date rate (also setup as the balance account). The formula attached to the account is for every foreign base entity executes this: api.Data.Calculate("A#JTD_COST:V#YTD:F#EndBalLoad:U8#None:C#USD = RemoveZeros(A#JTD_COST:V#YTD:F#EndBalLoad:U8#None:C#Local * A#JTD_FX_RATE:V#YTD:F#EndBalLoad:U8#None:C#Local)",,,,,"U1#Active.base") The problem is that when I set the original account with Formula Pass then I get an error during the consolidation suggesting the invalid destination data unit in script. When I don't attach any Formula Pass then nothing happens at all. Any suggestions what I miss or how else balance accounts can be translated? Thank you, OlaOlaWidera16 days agoNew Contributor II76Views0likes4CommentsTransformationEventHandler - Adding new member to main and Alternate hierarchy
Is it possible to add members to both main and alternate hierarchies using EventHandler from source. Was not able to achieve using existing code. Below code is being used to add new members from source to the Flow dimension which works for main hierarchy but not adding under Alternate hierarchy, any help is appreciated. The new member needs to get added under both parents below Dim flowDimName As String = "Product_Attributes" Dim flowMF As String = "F#TopProductAttributes.Base" Dim flowLookup As Dictionary(Of String, MemberInfo) = Me.CreateMemberLookupUsingFilter(si, flowDimName, flowMF) Dim ExistflowLookup As List(Of MemberInfo) = BRApi.Finance.Metadata.GetMembersUsingFilter(si, flowDimName, flowMF, True) Dim flowAddedMembers As New Dictionary (Of String, String) 'Set the parent to add new FLOW Members under Dim tFlowColIndex As Integer = (objTransformer.TransformerDimensions(StageConstants.MasterDimensionNames.Flow).DataTableColumnIndex) + StageConstants.TransformationColumnIncrements.Target '****************Start adding new members********************************************* 'Loop over all pages in the cache If objTransformer.DataCache.Pages.Count > 0 Then 'Move to the first page objTransformer.DataCache.MoveFirstPage(si) 'BRAPI.ErrorLog.LogMessage(si,"Add member Yes: Line 223") 'Process All pages in the data cache For intPageNo As Integer = 0 To objTransformer.DataCache.Pages.Count - 1 'Set the current data page objTransformer.DataCache.ActivatePage(si, intPageNo) 'Process each row in the data table on this page for each dimension we are checking For Each row As DataRow In objTransformer.DataCache.CurrentPage.PageDataTable.Rows ' BRApi.ErrorLog.LogMessage(si, "Line 123") 'Check the target Flow Value Dim targetFlow As String = row(tFlowColIndex) Dim flowDesc As String = "" '*** Product Attribute Description *** Dim flowMember As String = row(tFlowColIndex) 'Determine Flow Parent member Dim flowParent As String = "NA_RELEASE_STATUS" 'Determine Flow Parent member Dim flowParent As String = "NA_RELEASE_STATUS" If (Not row(tFlowColIndex) Is Nothing) Then If flowMember.XFContainsIgnoreCase("NOT_RELEASED~AUTOMOTIVE") Or flowMember.XFContainsIgnoreCase("NOTRELEASED~AUTOMOTIVE") Then flowParent = "NOT_RELEASED" ElseIF flowMember.XFContainsIgnoreCase("NOT_RELEASED~AUTOMOTIVE") Or flowMember.XFContainsIgnoreCase("NOT_RELEASED~AUTOMOTIVE") Then flowParent = "AUTOMOTIVE" End If End Iffellow_Ones17 days agoNew Contributor III28Views0likes0Comments