The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
Rithik_Prem
2 years agoNew Contributor III
Get Cube View Profile and Group Name using Business Rules
Is there any way to get the cube view profile and Group Name of the CubeView using Business Rules? Thanks.
- 2 years ago
Here is some code where you can loop through the rows of the data table and get the information needed (will have to change the "BalanceSheetCurrentPeriod_WF" to your CV Name):
Dim sqlStatement As String = String.EmptysqlStatement = $"Select CubeViewItem.Name AS [Cube View Name], CubeViewGroup.Name AS [Cube View Group Name], CubeViewProfile.Name AS [Cube View Profile Name]From CubeViewItemJOIN CubeViewGroup On CubeViewGroup.UniqueID = CubeViewItem.CubeViewGroupIDJOIN CubeViewProfileMember On CubeViewProfileMember.GroupID = CubeViewGroup.UniqueIDJOIN CubeViewProfile ON CubeViewProfile.UniqueID = CubeViewProfileMember.ProfileIDWhere CubeViewItem.Name = 'BalanceSheetCurrentPeriod_WF'"Using objDbConnInfoApp As DbConnInfoApp = BRApi.Database.CreateApplicationDbConnInfo(si)Dim dt As DataTable = BRApi.Database.ExecuteSql(objDbConnInfoApp, sqlStatement, True)For Each record As DataRow In dt.RowsDim cvName As String = record.Item(0)Dim cvGroupName As String = record.Item(1)Dim cvProfileName As String = record.Item(2)brapi.ErrorLog.LogMessage(si, "cvName: " & cvName & " cvGroupName: " & cvGroupName & " cvProfileName: " & cvProfileName )NextEnd Using
EricOsmanski
OneStream Employee
2 years agoUnderstood. But what if the group exists in multiple profiles (such as the below)? What Profile should show?
Related Content
- 2 years ago
- 2 years ago