Recent Discussions
How do I clean a scenario before copying data from another scenario? in the member formula.
Hi Everyone. I want to copy the information from one scenario to another. Currently, I’m using the member formula of the target scenario to transfer the data. However, I first apply a calculate to set the values to zero, followed by a clecarcalculateddata to properly remove the existing information. The issue is that after this step, the copy process doesn’t execute, and the scenario remains with zero values. My code is as follows: api.Data.calculate("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE = 0*(S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE)",True) api.Data.ClearCalculatedData("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE",True,True,True,True) Dim destinationInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE") '' Create new Databuffer for the results Dim resultDataBuffer As New DataBuffer 'Base Entity at Local If Not api.Entity.HasChildren And api.Cons.IsLocalCurrencyForEntity() Then BRapi.ErrorLog.LogMessage(si,"Validate 1") ' Get Databuffer from the account and scenario Dim sourceDataBuffer As DataBuffer = api.data.GetDataBufferUsingFormula("RemoveZeros(FilterMembers(S#[Forecast " & TimeName & "],[A#Root.Base]))", , False) ' Verificar si hay celdas con datos If sourceDataBuffer.DataBufferCells.Count > 0 Then BRapi.ErrorLog.LogMessage(si,"Validate 2") For Each sourceCell As DataBufferCell In sourceDataBuffer.DataBufferCells.Values If (Not sourceCell.CellStatus.IsNoData) And (sourceCell.CellAmount <> 0.0) Then BRapi.ErrorLog.LogMessage(si,"Validate 3") Dim resultCell As New DataBufferCell(sourceCell) resultCell.DataBufferCellPk.OriginId = DimConstants.Import resultDataBuffer.SetCell(si, resultCell, True) End If Next api.Data.SetDataBuffer(resultDataBuffer, destinationInfo,,,,,,,,,,,,,False) End If End If I would appreciate your help in understanding why the values are not being copied. The process is executed when I consolidate the information.Marco7 hours agoContributor II6Views0likes0CommentsIs there an example of using System.Reflection namespace with OneStream APIs
I'm driving myself a little crazy at the moment. Sometime in the last few days, I stumbled across a Community Post (I think) about how to use System.Reflection to programmatically list OneStream API object methods, overloads, parameters, etc. At the time I saw it, I thought "Oh, that's cool!" and remembered that if I needed to find it again, I just needed to search for "Reflection" in community posts. Well, for the life of me, I can't find the post again. Does anyone know of a post that describes how to use System.Reflection's methods, like GetMethods on OneStream API objects? I know I'm being lazy and could work out the code myself, but what I read had already worked out the BindingFlags and other parameters on the calls that were specific to OneStream.KurtMayer11 hours agoContributor6Views0likes0CommentsgetLiteralParameterValue in a KPI formula
I would like to use a parameter value in a KPI in my API_Calculate business rule. I have a literal value parameter and we will change the default value ahead of time to control which formula runs. I'm trying to pull the current default value with the following: Dim param As String = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, Nothing, "myFlag") When it gets to that line it throws a "Object reference not set to an instance of an object". Any ideas?JuleneDS15 hours agoNew Contributor II18Views1like2CommentsExporting Account Type
I'm currently trying to export the account dimension members and their properties through a csv file. I can get all the properties necessary, but I can't get the "Account Type" property through the extender rule. I'm currently using Account_Type= Brapi.Finance.Members.GetMemberInfo(si,dimTypeId,stkItem.Name,True,Nothing,MemberDisplay).Member.GetType.FullName , to get the account type in columns but it isn't returning the correct account type of the member and instead returning " OneStream.Shared.Common.Member " in the columns.amritp022 days agoNew Contributor II16Views1like2CommentsIf I change an account to allow input = false, will my BR still input data into the account?
Hello, I have an account that is calculated via a business rule. I don't want end users to input into the account manually. If I set the account to allow input = false, will my business rule still be able to input data into the account? Or do I need to leave it set to allow input = true, but make sure every cube view that uses the account does not allow manual input? Thank you.SolvedJanet_C2 days agoNew Contributor36Views1like2CommentsReturning a success or failure message from DM via REST API
Hi all, I'm triggering a DM job using the REST API. The job is running a business rule. I handle errors in the BR but I need to actually return the success or failure as a response to the postman request. Right now, I get a success message no matter what happens in the BR. Thanks in advance!mathieu_cartel3 days agoNew Contributor II5Views0likes0CommentsEntity 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 IfCahSin4 days agoNew Contributor14Views0likes0CommentsDataManagementEventHandler Args
Hi, I try to get the data unit information of different DM steps, such as Calculate, Copy Data, Reset Scenario, Clear Scenario, Custom Calculate. For a regular "Calculate" I'll get the information via Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DataManagementEventHandlerArgs) As Object Dim sbLog As New Text.StringBuilder Try Dim returnValue As Object = args.DefaultReturnValue Dim dmStepMetadataInfo As DataMgmtStepMetadataInfo If args.OperationName = BREventOperationType.DataManagement.ExecuteStep Then dmStepMetadataInfo = DirectCast(args.inputs(0), DataMgmtStepMetadataInfo) Dim entList As String = String.Join(",",dmStepMetadataInfo.EntityInfos.Select(Function(miMem) miMem.member.Name).ToList().ToArray()) as it is described in another communits-post. But if I do a "Copy Data", I don't know how to get the submitted data unit. args.inputs(0) is of type OneStream.Finance.Engine.DataMgmtStepMetadataInfo as far as I know from using the error log messages. But there is no documentation of the type "DataMgmtStepMetadataInfo" and I won't get the data unit infos the same way I did in the code above. args.inputs(1) is less interesting. It contains the user name, the DM step description and task activity information. There are no more args inputs. Any ideas how to pull the data unit information out of "DataMgmtStepMetadataInfo"? Regards, MarcusMarcus9 days agoNew Contributor II82Views0likes1CommentSupplied parameter tied to Bound List not returning value
Hi community, I have an issue where i have a member list tied to a bound list. The bound list uses a SQL query to get the top member of a given dimension. I have this bound list tied to a supplied parameter that I have attached to a dashboard. The issue is that when I run the dashboard, it is not triggering the bound list, even though i am using the supplied parameter. If I remove the supplied parameter and run the dashboard, it prompts me with the bound list parameter showing the value i want to return, and thereafter, when i put the supplied parameter back it works. It seems like the system needs to trigger the bound list first, but I haven't found a way to do so yet. Any thoughts?SolvedMike_Sabourin10 days agoContributor II73Views0likes3Comments- SikandarHamid10 days agoNew Contributor II36Views0likes3Comments