Syntax Starter
Hey - I seem to recall something/somewhere in the application I could reference to find sample syntax such as common financial logic and other starters. My memory is fuzzy, but I thought it was almost like a dialog box similar to the member filter builder, but inside the application. I can't seem to locate it in the application nor find reference material. Am I losing my mind?Solved18Views0likes2CommentsHelp with Table Views
Hello, I'm attempting to create my first table view using the syntax below. The SQL is a very basic record grab from DataEntryAuditSource (initial POC). Compiles fine and seems to be okay relative to the user guide, but I keep getting an error message when I attempt to run. Does anyone have any thoughts on what I could be doing wrong? Thanks, Sean ----- 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.Spreadsheet.UTM_TaskList Public Class MainClass Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As SpreadsheetArgs) As Object Try Select Case args.FunctionType ' Case Is = SpreadsheetFunctionType.Unknown ' Case Is = SpreadsheetFunctionType.GetCustomSubstVarsInUse Case Is = SpreadsheetFunctionType.GetTableView If args.TableViewName.Equals("SeansFirstTableView") Return GetUTMTaskListExport(si) End If ' Case Is = SpreadsheetFunctionType.SaveTableView End Select Return Nothing Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function #Region "Get Table Views" Private Function GetUTMTaskListExport(ByVal si As SessionInfo) As TableView Try Dim SQL_TaskListExport_L As New Text.StringBuilder SQL_TaskListExport_L.AppendLine(" SELECT DataEntryAuditSource.UserID as ID, DataEntryAuditSource.TimeStamp as TimeStamp, DataEntryAuditSource.UniqueID as RecordID, DataEntryAuditSource.CubeVieworFileName as Format, DataEntryAuditSource.DataEntryType as Type, FROM DataEntryAuditSource ") 'Create and fill the DataTable Dim DT_TaskListExport_L As DataTable = Nothing Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si) dt_TaskListExport_L = BRApi.Database.ExecuteSql(dbConnApp, sql_TaskListExport_L.ToString, False) If Not dt_TaskListExport_L Is Nothing Then dt_TaskListExport_L.TableName = "NoData" End Using 'Create and Populate Table View Dim tv_TaskListExport As New TableView() tv_TaskListExport.PopulateFromDataTable(dt_TaskListExport_L, True, True) 'Table View Settings and Formatting tv_TaskListExport.CanModifyData = False tv_TaskListExport.HeaderFormat.BackgroundColor = XFColors.XFDarkBlueBackground tv_TaskListExport.HeaderFormat.TextColor = XFColors.White tv_TaskListExport.HeaderFormat.IsBold = True tv_TaskListExport.Columns.Item(1).ColumnFormat.ColumnWidth = 15 Return tv_TaskListExport Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function 'GetUTMTaskListExport #End Region End Class End Namespace39Views0likes3CommentsHow to get cell context?
This is the layout of my CV I'm using an XFBR in rows (and columns); the rules for each scenario are different; how do I get the context from the columns? In other words, when the scenario is Budget I want to apply specific rules for that scenario, same thing for Actual. This would be the script: Namespace Workspace.__WsNamespacePrefix.__WsAssemblyName.BusinessRule.DashboardStringFunction.REP_ParamHelper Public Class MainClass Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As Object Try If args.FunctionName.XFEqualsIgnoreCase("GetAccount") Then //Do something End If End Function End Class End Namespace12Views0likes1CommentHelp Needed with Confirmation Rule to Validate Annotations for Thresholds
Hello OS Community. I'm working on a confirmation rule that is supposed to check for the presence of annotations when thresholds are defined. The intended behavior is: If thresholds are present, but no annotation/comment is provided, the rule should fail validation. However, the logic isn't working as expected. Even when no comment is given, the rule still passes and acts as if a comment is provided. Here’s what I need help with Ensuring that the rule correctly identifies missing comments and fails as intended. Identifying what might be wrong in my current logic it seems to incorrectly detect comments even when none exist. Any insights or examples of similar logic would be much appreciated!Solved109Views0likes13CommentsMap source account to target account member and Ud4 member
Hi Everyone, I have a source file which contains multiple accounts in the columns for one month. These accounts are not there in the cube. I do not have a ud4 dimension in the source file. Each source account should be mapped to an account and Ud4 member. for ex: Account a001 has to be mapped to account A#a1 and Ud4#cost. Similarly Account b001 has to be mapped to account b#b1 and Ud4#sale. A#[a001]=A#[a1]:UD4#[cost] A#[b001]=A#[b1]:UD4#[sale] How can this be achieved in the transformation rule. Also, the data source needs to have ud4 or not. Thanks, Jeevan27Views0likes2CommentsBeginning Balance Formula
Our beginning balance formula is as follows: 'Check to see if we are in period 1 If api.Time.IsFirstPeriodInYear() Then ......... Else ............... This formula worked perfectly rolling from 2023 into 2024, but now in 2025 we are having issues. EX: In Feb 2025, the beginning balance is reverting back to Dec 24 instead of Jan 25. Any insight into where I might start in figuring out this error? I tried looking at our business rules for api.time and didn't see anything that stood out. Thanks!72Views0likes2CommentsSaveCustomDataTable Gives Error
I want to load OneStream application data to external database. And there is an existing connection to the target external database. But it gives me below error, could you please help? No idea what is wrong. BTW, "FDH_DEV" is SIC external database connection. 'Build a data table with one test line Dim TestTbl As New DataTable TestTbl.Columns.Add("Tmt", Type.GetType("System.String")) TestTbl.Columns.Add("SEnt", Type.GetType("System.String")) TestTbl.Columns.Add("TEnt", Type.GetType("System.String")) TestTbl.Columns.Add("SAct", Type.GetType("System.String")) TestTbl.Columns.Add("SActD", Type.GetType("System.String")) TestTbl.Columns.Add("TAct", Type.GetType("System.String")) TestTbl.Columns.Add("TActD", Type.GetType("System.String")) TestTbl.Columns.Add("SFlw", Type.GetType("System.String")) TestTbl.Columns.Add("TFlw", Type.GetType("System.String")) TestTbl.Columns.Add("SIc", Type.GetType("System.String")) TestTbl.Columns.Add("TIc", Type.GetType("System.String")) TestTbl.Columns.Add("SU1", Type.GetType("System.String")) TestTbl.Columns.Add("TU1", Type.GetType("System.String")) TestTbl.Columns.Add("SU2", Type.GetType("System.String")) TestTbl.Columns.Add("TU2", Type.GetType("System.String")) TestTbl.Columns.Add("SU3", Type.GetType("System.String")) TestTbl.Columns.Add("TU3", Type.GetType("System.String")) TestTbl.Columns.Add("SU4", Type.GetType("System.String")) TestTbl.Columns.Add("TU4", Type.GetType("System.String")) TestTbl.Columns.Add("SU5", Type.GetType("System.String")) TestTbl.Columns.Add("TU5", Type.GetType("System.String")) TestTbl.Columns.Add("SU6", Type.GetType("System.String")) TestTbl.Columns.Add("TU6", Type.GetType("System.String")) TestTbl.Columns.Add("SU7", Type.GetType("System.String")) TestTbl.Columns.Add("TU7", Type.GetType("System.String")) TestTbl.Columns.Add("SU8", Type.GetType("System.String")) TestTbl.Columns.Add("TU8", Type.GetType("System.String")) TestTbl.Columns.Add("SAmt", Type.GetType("System.Decimal")) TestTbl.Columns.Add("TAmt", Type.GetType("System.Decimal")) TestTbl.Rows.Add("Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test","Test",100,100) BRApi.Database.SaveCustomDataTable(si, "FDH_DEV", "ods.ONESTREAM_EXTRACT_Src2TgtDashboard", TestTbl, True)83Views0likes5CommentsWeekly scenario - Use scenario start/end period settings
Hi community, For one of our clients we are looking for the following. - We create 52 weekly scenario with each their own start and end period setting in the workflow start time and workflow end time. For example we have the scenario CFF_2022W01 which has a workflow start time as 2022W1 and a workflow end time as 2022 W39. For example the scenario CFF_2022W02 which has a workflow start time as 2022W2 and a workflow end time as 2022 W39 etc. How can we get a list of members of the range within the start and end time in the scenario. So for example based on the CFF_2022W01 scenario it should return in the list 2022W1, 2022W2 up until 2022W39. For CFF_2022W02 it should return in a list 2022W2, 2022W3 up until 2022W39. There is also the example when the periods run across years. So for example the scenario CFF_2022W27 has a workflow start time of 2022W27 and end time of 2023W13. The list should then return 2022W27, 2022W28 up until 2022W52 plus also 2023W1 up until 2023W13. This is what I used so far but is not working correctly for weeks. --- Dim instance As New BRApiFinanceScenario() Dim ScenarioStartPeriod As Integer = instance.GetWorkflowStartTime(si, ScenarioId) Dim ScenarioEndPeriod As Integer = instance.GetWorkflowEndTime(si, ScenarioId) Dim noOfNoInput As Integer = instance.GetWorkflowNumNoInputTimePeriods(si, ScenarioId) Dim ScenarioPeriods As List(Of Integer) = TimeDimHelper.GetIdsInRange(ScenarioStartPeriod, ScenarioEndPeriod) 'Removes all periods up until the input range ScenarioPeriods.RemoveRange(0, noOfNoInput) ----- Has anyone come across using these settings and what syntax should be used.1.2KViews1like3Comments