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.Marco14 hours agoContributor II10Views0likes1CommentIs 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.KurtMayer17 hours agoContributor9Views0likes0CommentsgetLiteralParameterValue 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?JuleneDS2 days 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.amritp023 days agoNew Contributor II16Views1like2CommentsReturning 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 IfCahSin5 days agoNew Contributor14Views0likes0Comments- SikandarHamid13 days agoNew Contributor II37Views0likes3Comments
Version 9.0 Redacting information in Error Log
Dear Community Members, Has anyone experienced information in the log being redacted. I found this in the latest documenation. However, i see no pattern of what is considered sensitive. I have a data table dump in the decimal positions are redacted. I am logging the keys and values of two dictionaries. in both dictionaries the value is an integer. One value is shown while the other value in redacted. Both values come from a text member of a dimension member. In other cases i am logging the name of the business rule and the name of the function. Sometimes the RULENAME is redacted, sometimes it is not. Which leads me to believe that the logic thinks that the name is sensitive?! Is this sensitivity controllable maybe on the app settings on the server? Cause it seems overly sensitive or plainly wrong in determining what is sensitive and what is no.WernerN15 days agoContributor II248Views0likes8CommentsSubtle bug in Example for Dynamic Dimensions
In the example code for the Dynamic Dimension Service there appears to be a subtle bug which will affect refresh of the dimensions. ReadDynamicDimensionInfo(...) returns DateTime.Now: ' This api method will build the required object, straight from an SQL query. Return api.ReadDynamicDimensionInfo(si, args, DateTime.Now, numSecondsBeforeCheckTS, _ dbConn, sql.ToString, Nothing, Nothing, _ "Name", "Description", "UniqueID", "Name", "Parent", "ParentID", "Parent", "AggWeight", True) BUT ReadDynamicDimensionContentTimestamp sets the Timestamp as DateTime.UTCNow: 'Refresh once per minute (note: frequent refreshes such As one minute could degrade performance). Dim utcNow As DateTime = DateTime.UtcNow Return New DateTime(utcNow.Year, utcNow.Month, utcNow.Day, utcNow.Hour, utcNow.Minute, 0, 0, DateTimeKind.Utc) This will matter if your refresh period is < 13(?) hours AND if your TimeZone is ahead of UTC...... It's an easy fix though! SteveSteveK17 days agoNew Contributor III47Views2likes8CommentsWhat does api.Data.GetRelationshipChanges(dimensionName, startDate, endDate) return?
Hello, I already have a data file for cost centers and their Default values, but now I need to include the before and after changed values to the cost center member. I found this code: Function GetRelationshipChangesForTimeSpan(ByVal api As Api, ByVal dimensionName As String, ByVal startDate As DateTime, ByVal endDate As DateTime) As List(Of RelationshipChange) ' Initialize a list to store relationship changes Dim relationshipChanges As New List(Of RelationshipChange) ' Use the API to retrieve relationship changes relationshipChanges = api.Data.GetRelationshipChanges(dimensionName, startDate, endDate) ' Return the list of changes Return relationshipChanges End Function How can I tell what data it's actually returning, what columns? Is there a better way to do this? Any help is greatly appreciated! Thanks!cap0821 days agoNew Contributor III38Views0likes2Comments