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
Filip
1 year agoNew Contributor II
How to name a CV column member in business rule
Dear community,
Is there a way to name (:Name("test")) a column when the columns in a CubeView is set by a parameter (Application dashboard) which is referencing to a business rule?
I want the last member to be renamed from description "2024 Q2" to a name I choose "2024Q2 YTD"
Public Function GetFCTCVColumnSet(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As String
Try
Dim CurrentScen As String = args.NameValuePairs.XFGetValue("SelectedScenario").ToString.Replace("'","")
Dim CheckFct As String = CurrentScen.Substring(0,8)
Dim CheckFctSubstring As String = CurrentScen.Substring(0,12)
Dim TimePeriods As String = ""
Dim CurrentScenYear As String = CurrentScen.Substring(CurrentScen.Length - 4)
Dim CurrentScenNextYear = CurrentScenYear + 1
Dim CurrentScenNextNextYear = CurrentScenNextYear + 1
TimePeriods = "T#" & CurrentScenYear & "Q2:V#Periodic:U3#Top:U4#Top:U5#Top,T#" & CurrentScenNextYear & "Q2:V#Periodic,T#" & CurrentScenNextYear & "Q2:V#YTD"
4 Replies
- TheJonG
OneStream Employee
Hi - have you tried:
TimePeriods = "T#" & CurrentScenYear & "Q2:V#Periodic:U3#Top:U4#Top:U5#Top,T#" & CurrentScenNextYear & "Q2:V#Periodic,T#" & CurrentScenNextYear & "Q2:V#YTD:Name("2024Q2 YTD")"
- db_pdxValued Contributor
I'm interpretting that your BR is generating a (complex) member expansion (as a string), correct? If so, you should be able to use regular MF variables. For example, your Cube View Column would be:
|!YourParameterThatResolvesXFBRString!|:Name(|MFTime| |MFView|)
Or if you are referencing the XFBR directly in the cube view column it would be something like:
XFBR(YourBRName, YourFunctionThatGeneratesMemberExpansionString, SomeParameter=|!YourCustomParameter!|):Name(|MFTime| |MFView|)
Cheers, -db
Related Content
- 2 years ago