Retrieve App Names from Development Environment via Business Rule
Hi, as the title suggests, I'm looking for a way to pull a list of all app names that reside within our Development environment. I know the Snapshot report provides this (but BR are encrypted), but I was wondering if there's a BR way to achieve it.
Here is a snippet of what I was attempting to. Please feel free to critique or provide suggestion. Thank you!
Dim brapi As BRApi = CType(api, BRApi)Dim dbConnFramework As DbConnInfo = brapi.Database.CreateFrameworkDbConnInfo(si)Using dbConnFrameworkDim connectionlink As String = si.WebServerUrlUsedByClient'Here I was trying to access the environment DB which I believe holds the recordsDim sql As String = "SELECT AppName FROM dbo.App ORDER BY AppName"Dim sb As New StringBuilder()sb.AppendLine("----------- OneStream Applications in Dev ---------")sb.AppendLine("")Dim rowCount As Integer = 0Using dt As DataTable = brapi.Database.ExecuteSql(dbConnFramework, sql, True)If dt.Rows.Count = 0 Thensb.AppendLine("No applications found.")ElseFor i As Integer = 0 To dt.Rows.Count - 1sb.AppendLine((i + 1).ToString() & ". " & dt.Rows(i)("AppName").ToString())NextEnd IfrowCount = dt.Rows.CountEnd Usingsb.AppendLine("")sb.AppendLine("Total Applications: " & rowCount)Throw New XFUserMsgException(si, "", "", connectionlink.ToString())End Using



