Recent Discussions
How can I subtract the result of two DIVIDE operations within a CALCULATE function?
Hi Everyone. I have the following CALCULATE expression, but it’s returning no results. The source values are not zero, so I’m not sure if the way I’m using the DIVIDE function is causing the issue, or if there is another problem Dim DBCInner As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(A#RETBUYBACK:E#" & strEntTx3 & ":C#Local:O#Top:U2#INNER:UD3#COUNTRY_RPT + A#423100:E#" & strEntTx3 & ":C#Local:O#Top:U2#INNER:UD3#COUNTRY_RPT + A#411000:E#" & strEntTx3 & ":C#Local:O#Top:U2#INNER:UD3#COUNTRY_RPT)") api.Data.FormulaVariables.SetDataBufferVariable("DBCInner",DBCInner,False) Dim regionalRpt As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(A#RETBUYBACK:E#" & strEntTx3 & ":C#Local:O#Top:U2#INNER:UD3#REGIONAL_RPT + A#423100:E#" & strEntTx3 & ":C#Local:O#Top:U2#INNER:UD3#REGIONAL_RPT + A#411000:E#" & strEntTx3 & ":C#Local:O#Top:U2#INNER:UD3#REGIONAL_RPT)") api.Data.FormulaVariables.SetDataBufferVariable("rptValue",regionalRpt,False) api.Data.Calculate("A#P_EBIPrct:O#Import:U2#P0000:UD3#REG_ADJ:U4#PJ00000 = Divide($rptValue,A#411000:E#"& strEntTx3 &":C#Local:O#Top:U2#INNER:UD3#REGIONAL_RPT) - Divide($DBCInner, A#411000:E#" & strEntTx3 & ":C#Local:O#Top:U2#INNER:UD3#COUNTRY_RPT)") I would appreciate your assistance.Marco3 days agoContributor II15Views0likes1CommentPeriodic data copy from YTD scenario
i have blow code to copy the periodic values from YTD scenario but it didn't work Dim sourceBuffer1a As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(S#" & sSourceForecast & ",V#PERIODIC,A#Top.Base,O#AdjInput)", DataApiScriptMethodType.Calculate, False, destination) Dim sourceBuffer1b As DataBuffer = api.Data.GetDataBufferUsingFormula("FilterMembers(S#" & sSourceForecast & ",V#PERIODIC,A#Top.Base,O#Forms)", DataApiScriptMethodType.Calculate, False, destination) Dim sourceBuffer1 As DataBuffer = sourceBuffer1a + sourceBuffer1b If (Not sourceBuffer1 Is Nothing) Then Dim resultBuffer1 As New DataBuffer() For Each sourceCell As DataBufferCell In sourceBuffer1.DataBufferCells.Values Dim resultCell As New DataBufferCell(sourceCell) If sourceCell.CellStatus.StorageType=DataCellStorageType.Input _ Or sourceCell.CellStatus.StorageType=DataCellStorageType.Journals _ Or sourceCell.CellStatus.StorageType=DataCellStorageType.DurableCalculation Then resultCell.CellAmount = sourceCell.CellAmount resultBuffer1.SetCell(si, resultCell,True) End If Next api.Data.SetDataBuffer(resultBuffer1, destination,,,,,,,,,,,,,True) End If is there any other code suggestion?Manjunathak3 days agoNew Contributor III6Views0likes0CommentsFileShare Harvest Folder view and deletion
Hello All, Our initial setup had everything copying data files to Application/Batch/Harvest folder. There has been multiple years of files stored in this location making it unable to open. I am trying to create something to pull the files and if folders are created to delete the stored files. I am uable to open the path and the clean up business rule fails to run due to the size. I spoke with some developers at Nashville Splash and am reaching out on here as well.PhinaDanM5 days agoNew Contributor49Views1like3CommentsIC Account copy
Need to copy an IC account data (Is IC Account = True) between scenarios, one way or another, and it seems like I can't. Tried databuffer copy - no worky. Tried api.data.calculate - same, nothing copied. In the end I tried "Copy Data" data management step for the entire data unit and IC account hasn't been copied. I set "Is IC Account = False" in the account settings and the data was copied without any problem, so said IC setting seems to be the only reason. Is this normal behavior? Something I missed in the documentation?Koemets6 days agoContributor48Views0likes5CommentsQuick OneStream Rule Behavior Check – O#Top Returning O#Import Value?
Hi Team, Quick question — has anyone else encountered this behavior in rule logic? I’m working with a standard api.Data.GetDataCell(...) call that includes the O#Top member in the POV. Here's the line I'm using: Dim baseValue As Decimal = api.Data.GetDataCell("C#Local:A#1104000000:F#CLO:O#Top:I#Top:U1#Top:U2#Top:U3#Top:U4#Top:U5#Top:U6#Top:U7#Top:U8#Top").CellAmount. BRApi.ErrorLog.LogMessage(si, baseValue) On the Cube View, this correctly returns -501 under O#Top. However, when I log the value in the rule using: - It outputs the value from O#Import, not the aggregated O#Top result I expected. This rule worked flawlessly for 3 years until now on Version 7.4. As a workaround, I manually aggregated the base origin members in the rule, which produced the expected result. However, I’m still unclear why O#Top didn’t aggregate properly in this case, given that it functions as expected in Cube Views. I checked and compared with several other apps, including Golfstream, in which this rule worked. Environment: This behavior was observed in 7.4. After upgrading to version 8.4, the issue was resolved. I’d like to understand what may have caused this inconsistency, particularly: Could a bug affect the Origin dimension, which was resolved in 8.4? Has anyone experienced this behavior before? Appreciate any insights or similar experiences the community can share!ChrisBriscoe6 days agoNew Contributor II49Views0likes1CommentIssue Enabling User via API – SaveUser() Fails with “User Already Exists” Error
Hi! We’ve developed a custom REST API in our OneStream application to automate user management. So far, the following methods are working successfully: CreateUser – Creates a new user DisableUser – Disables an existing user Now, we are trying to add a new method: EnableUser – This method receives a user name and sets the IsEnabled property to True. The logic is quite simple. We retrieve the existing user using: Public Sub EnableUser() ' Get user name Dim username As String = Me._UserProperties("name") If String.IsNullOrEmpty(username) Then Throw New Exception($"Supplied name is empty") ' Get user Dim userToEnable As UserInfo = BRApi.Security.Authorization.GetUser(Me._Si, username) If userToEnable Is Nothing Then Throw New Exception($"User '{username}' was not found in OneStream") ' Set IsEnabled = True userToEnable.User.IsEnabled = True Try BRApi.Security.Admin.SaveUser(Me._Si, userToEnable.User, False, Nothing, TriStateBool.TrueValue) Catch ex As Exception Throw New Exception("Problem enabling user, Error message: " + Environment.NewLine + ex.GetBaseException.Message) End Try Me._Logger.AppendToLogger($"User '{username}' has been enabled") End Sub However, when we try to execute this method, we get the following error: Problem enabling user, Error message: Error saving User. 'Test' already exists. This seems misleading because we're not trying to create a new user—we're retrieving an existing one and updating it. The createNewUser flag is explicitly set to False, and we are using the original UserInfo.User object returned by the API. We’ve ensured that all key properties like Name, UserType, Email, etc., are populated. It seems that SaveUser() is still attempting to create a new user instead of updating the existing one. Has anyone encountered this behavior before? Is there a specific requirement or workaround to ensure SaveUser() correctly recognizes an update instead of a creation? Any insights or guidance would be greatly appreciated. Regards, XaviSolvedWiskiOne10 days agoNew Contributor III30Views0likes2CommentsDetermine Workflow Profile Security Access in a Dashboard Extender Rule
I'm using the following code snippet in a Dashboard Extender Rule to loop through the list a of Workflow Profiles. However, the code fails, if the user does not have security access to a particular Workflow Profile, returned in the list. Is there a way I can get the list returned with security access applied, so the list only returns Workflow Profiles that the user has access to? Dim profile As String = "text1 tag to match" Dim wfProfileName As String = "" Dim cubeRootInfo As WorkflowCubeRootInfo = BRApi.Workflow.Metadata.GetCubeRootInfo(si, si.WorkflowClusterPk.ProfileKey, True) cubeRootCluster As New WorkflowUnitClusterPk(si.WorkflowClusterPk) cubeRootCluster.ProfileKey = cubeRootInfo.CubeRootProfile.ProfileKey Dim profileInfos As List(Of WorkflowProfileInfo) = BRApi.Workflow.Metadata.GetRelatives(si, cubeRootCluster, WorkflowProfileRelativeTypes.Descendants, WorkflowProfileTypes.BaseAndParentInputProfiles) For Each profileInfo As WorkflowProfileInfo In profileInfos Dim wfScenarioTypeID As Integer = BRApi.Workflow.General.GetScenarioTypeId(si, cubeRootCluster) If profile = profileInfo.GetAttributeValue(WfScenarioTypeID,sharedconstants.WorkflowProfileAttributeIndexes.Text1) wfProfileName = profileInfo.ToString ' brapi.ErrorLog.LogMessage(si," profileInfo.Name = " & profileInfo.ToString & " : Text1 = " & profileInfo.GetAttributeValue(WfScenarioTypeID,sharedconstants.WorkflowProfileAttributeIndexes.Text1)) End If NextChrisR1chgov11 days agoNew Contributor398Views0likes5CommentsDynamic Dashboard - Creating new components ?
Dear community, Using Dynamic dashboard, is it possible to add completely new components from scratch ? So far, I was able to define a label with DashboardComponent function, and somehow add it to a component collection using WsDynamicDbrdCompMemberEx and adding it to WsDynamicComponentCollection . But that's it, I dont knw how to add it to my dynamic dashboard. Any hints ? Regards,Sergey18 days agoContributor III128Views0likes3CommentsCustomize scenario visibility for some entities
Can someone help with creating a BR to customize scenario visibility for some entities using .NET ? I have a list of entities that don't share a common parent and want them to not be visible in the budget scenario.jaideepk19 days agoNew Contributor20Views0likes2Comments