Data source Connector - Nested Drill back
Hi, I am trying to build a Drill back functionality in one of data source connector business rules. I tried looking into One Stream reference guide on Data Source connector business rules and I found below reference for nested Drill back functionality. But practically when I tried to drill back on a drill back detail row, OS returns following message. The click on the drill back is not even calling the connector business rules any more. Can someone help me with the ways to code with nested drill backs. I tried to follow the examples from Golfstream application. Private Function GetDrillBackTypeList(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer, ByVal args As ConnectorArgs) As List(Of DrillBackTypeInfo) Try 'Create the SQL Statement Dim drillTypes As New List(Of DrillBackTypeInfo) If args.DrillCode.Equals(StageConstants.TransformationGeneral.DrillCodeDefaultValue, StringComparison.InvariantCultureIgnoreCase) Then 'Source GL Drill Down drillTypes.Add(New DrillBackTypeInfo(ConnectorDrillBackDisplayTypes.FileShareFile, New NameAndDesc("InvoiceDocument", "Invoice Document"))) drillTypes.Add(New DrillBackTypeInfo(ConnectorDrillBackDisplayTypes.DataGrid, New NameAndDesc("MaterialTypeDetail", "Material Type Detail"))) ElseIf args.DrillCode.Equals("BOMDetail", StringComparison.InvariantCultureIgnoreCase) Then 'Material Type Drill Down drillTypes.Add(New DrillBackTypeInfo(ConnectorDrillBackDisplayTypes.DataGrid, New NameAndDesc("MaterialAllProducts", "Material All Products"))) drillTypes.Add(New DrillBackTypeInfo(ConnectorDrillBackDisplayTypes.DataGrid, New NameAndDesc("MaterialAllVendors", "Material All Vendors"))) End If Return drillTypes Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function 'Execute specific drill back type Private Function GetDrillBack(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer, ByVal args As ConnectorArgs, ByVal connectionString As String) As DrillBackResultInfo Try If args.DrillBackType.NameAndDescription.Name.Equals("InvoiceDocument", StringComparison.InvariantCultureIgnoreCase) Then 'Level 1: Show FileShare File Dim drillBackInfo As New DrillBackResultInfo drillBackInfo.DisplayType = ConnectorDrillBackDisplayTypes.FileShareFile drillBackInfo.DocumentPath = Me.GetDrillBackDocPath_L1(si, globals, api, args) Return drillBackInfo ElseIf args.DrillBackType.NameAndDescription.Name.Equals("MaterialTypeDetail", StringComparison.InvariantCultureIgnoreCase) Then 'Level 1: Return Drill Back Detail Dim drillBackSQL As String = GetDrillBackSQL_L1(si, globals, api, args) Dim drillBackInfo As New DrillBackResultInfo drillBackInfo.DisplayType = ConnectorDrillBackDisplayTypes.DataGrid drillBackInfo.DataTable = api.Parser.GetXFDataTableForSQLQuery(si, DbProviderType.OLEDB, connectionString, True, drillBackSQL, False, args.PageSize, args.PageNumber) Return drillBackInfo ElseIf args.DrillBackType.NameAndDescription.Name.Equals("MaterialAllProducts", StringComparison.InvariantCultureIgnoreCase) Then 'Level 1: Return Drill Back Detail Dim drillBackSQL As String = GetDrillBackSQL_L2(si, globals, api, args, True, False) Dim drillBackInfo As New DrillBackResultInfo drillBackInfo.DisplayType = ConnectorDrillBackDisplayTypes.DataGrid drillBackInfo.DataTable = api.Parser.GetXFDataTableForSQLQuery(si, DbProviderType.OLEDB, connectionString, True, drillBackSQL, False, args.PageSize, args.PageNumber) Return drillBackInfo ElseIf args.DrillBackType.NameAndDescription.Name.Equals("MaterialAllVendors", StringComparison.InvariantCultureIgnoreCase) Then 'Level 1: Return Drill Back Detail Dim drillBackSQL As String = GetDrillBackSQL_L2(si, globals, api, args, False, True) Dim drillBackInfo As New DrillBackResultInfo drillBackInfo.DisplayType = ConnectorDrillBackDisplayTypes.DataGrid drillBackInfo.DataTable = api.Parser.GetXFDataTableForSQLQuery(si, DbProviderType.OLEDB, connectionString, True, drillBackSQL, False, args.PageSize, args.PageNumber) Return drillBackInfo Else Return Nothing End If Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function Thanks, Mohan Alluri.Solved4.7KViews0likes13CommentsGetting Column Text Value from Derivative Rule
Hi I have a derivate rule that I created that returns the absolute value of an amount based on column name. The column names are assigned in the data source and based on the data source column it will either assign an absolute value or a negative value. I want to be able to pull a column in my derivate rule that is a text attribute column and if the text equals something like "S5" it will do some type of conditional logic. With my limited experience with derivative rules and research it seems this cannot be done via a derivative rule. First question: Is there a way for me to do this? Second: If not, is there another alternative way that I can extract the text field of a column and based on that to do some type of additional logic?22Views0likes1CommentMap 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, Jeevan31Views0likes2CommentsSummary: The remote server returned an error: (502) Bad Gateway
Hello OS Community - We are running into below error while trying to load 1 + million records from SAP via connector business rule. Tried with all the options on Cache Page Size limit, at present it is set as below. We did not have any luck so far. Any recommendations or guidance is much appreciated. Summary: The remote server returned an error: (502) Bad Gateway Thanks.Solved29Views0likes1CommentOLEDB positional parameters with a WHERE IN clause
We have FX rates published in a table to/from virtually every currency in the world. However, this is something like 70k rates a month and the vast majority are for currencies we don't use in our OneStream application. The majority of the rest are for combinations that we don't use. Of these tens of thousands of rates, only about 25-30 are actually relevant. I'm trying to automate this filtering using the currency filter from the application properties, which returns a simple comma-separated list, like so: CAD,EUR,JPY,USD In this example, I want all rates to/from USD. So, I ditch the ",USD" and want to filter on the three remaining currencies: CAD,EUR,JPY Writing a query in SSMS, this is trivial. Writing the query with straight up string manipulation in the BR is also straightforward. However, I'm trying to be (perhaps needlessly strict/cautious) by passing this in as a parameter. This makes me want to use my laptop as a non-brand-specific flying disc and restart life as a hermit in a cave with no electricity. Un-typed positional parameters in an OLEDB connection are a nightmare (but probably because I need to learn more.) My basic thought is something like this: BRApi.Database.ExecuteSqlUsingReader(dbConnInfo, sql, params, False) SELECT FromCurrency,ToCurrency,Rate FROM FxRateTable WHERE (FromCurrency IN (?) AND ToCurrency = 'USD') OR (ToCurrency IN (?) AND FromCurrency = 'USD') I parsed the currency list to include single-quotes around the currencies and then just passed in P1 and P2 parameters as the same value so it should evaluate to a very normal WHERE IN clause. I get zero results from within OS. If I hardcode the list of currencies (comma-separated with single-quotes) in place of those ?s in the BR, the code succeeds and updates the rates in my OS application. I can only assume there's some type of data type problem that isn't making the translation through the OLEDB driver. I can conceive of a several possible avenues of investigation: There's a way of passing in these currencies as a string and I'm just doing something wrong that should be obvious. I need to add data-typing code in the BR (and perhaps store the currencies in a compatible data type) for OLEDB to play nice. I switch all of our external DB connections to SqlServer native so I can pass in named, typed parameters. (In this case, the docs only have instructions for setting up OLEDB, not native SqlServer. Does anyone have info on this?)Solved61Views0likes3CommentsFDXExecuteCubeView
Hi, I am working on extracting data from a Cube view to a flat file. I am using FDXExecuteCubeView query to extract. The extract file is executed to run for one year. I am seeing for each Entity, Scenario, Time (DU) a log entry is created in Task Activity. The Task Activity is getting flooded with cube view log entries. Is there a way to stop the Cube view entries for each Page (Entity, Scenario, Time).? On the Cube view I have the log setting set to False and also in the FDXExecuteCubeView setting I have the logStatistics setting set to False. Is there a way to not log the entry for each time cube view is run for (Entity, Scenario, Period)? Appreciate your inputs!44Views1like0CommentsSaveCustomDataTable 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)129Views0likes5CommentsBusiness Rules for new OS implementation
Hi, we are implementing OS at present, and this is our first-ever project in OneStream; I need guidance on Business Rules. I am not sure what business rules we need to consider after and before we import the data from the Client system to match the client's legacy system data with OneStream numbers. Thanks, PreetiSolved84Views0likes2Comments