Help 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 Namespace38Views0likes3Commentsdetermining parent by hierarchy
tldr: What's a performant, reliable way to determine a member's parent within a given hierarchy? I have been developing a custom extender rule to automate OneStream metadata updates based on our master metadata source. One of the last remaining tasks to solve is how to correctly execute member moves. As OneStream can have a given member exist multiple times in the same dimension, the only way to execute a move in OneStream is by specifying "move from parent A to parent B." Parent B is quite easy to determine as our metadata source provides this information per-hierarchy and does not allow duplicates but it does not tell us parent A, or even if there was a move at all. This means I have to validate that the specified member 1) is under the same parent that our metadata source says it should be and 2) isn't anywhere else in the hierarchy. However, in OneStream, I know of no way to query the parent(s) of a member but only those within a specific hierarchy. I've never needed to do this in a BR before but I have definitely been stung by this limitation while working with QVs in the past. This makes it feel like a common-enough need that there's probably a way to do it that I'm just unaware of. If not, I'll have to code it myself and I could use some insight into a performant and logically-sound way to do it. So far, the only approach I can imagine is this: BR API GetDescendants to pull all members in a hierarchy. Verify the child exists in the hierarchy. BR API GetParents to pull all parents of the child. Iterate through each parent to see which one(s) exists in the hierarchy. If there's only one and it differs from the one provided by our metadata source, move it. If there are multiple, oh bother. However, I foresee a lot of unpleasant little surprises in developing this. I also worry about performance as there's a Cartesian product of the number of descendants times the number of parents. Even if it's speedy, it still seems like a very indirect route to take for what is conceptually simple. What's the better way to do this?95Views0likes17CommentsOutbound Files through SIC Using UNC
Need some ideas on how to out bound files from OS shared folders to a network driver using UNC through SIC (we are upgrading to 8.2 from 7.3). We have SFTP through SIC works already, however, this specific process cannot be replaced by SFTP at this time. I have seen discussions and recommendation about inbounding through SIC only.602Views0likes5CommentsMap 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, Jeevan27Views0likes2CommentsRead a specific cell value from a Spreadsheet object
I have a need to read a cell value from a Spreadsheet object (Cell D3 to be specific) that will change the color of a button object in a dashboard. The cell converts color parameters to ARGB style, and I want to use this to show an example of the color in another object. Thoughts? I want the cell vale to set a literal parameter which will refresh the object14Views0likes0CommentsService Factory - Data Management Step
We're moving most of the Business Rules to Workspaces Assemblies under PV 8.4. - We have several Extensibility Rules that are run by multiple Data Management (DM) Jobs like you. - Hence, we included separate DM Step Services (DMSS) in the same Service Factory (SF). - The result of this SF setup was chaos. - We saw that launching one DM Job by a given DMSS in the SF will also launch other DM Jobs by their DMSS in the SF. We couldn't find enough practical advice on the SF/DMSS setups in the Design Guide to overcome this chaos. Pls share how to set up Data Management Step Services in a Service Factory to launch one Extensibility Rule/DM Job at a time. TY.189Views0likes9CommentsHow to include Member IDs in data export
We are using an extender business rule to run FdxExecuteDataUnit and write the data (with dimensionality) to a file. The file generated seems to be a standard format with a column for each dimension. Does anyone have any ideas on how to include the Member IDs in the file export? Thank you, DeniseSolved119Views0likes8Comments