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's avatar
Filip
New Contributor II
1 year ago

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's avatar
    TheJonG
    Icon for OneStream Employee rankOneStream 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")"

    • Filip's avatar
      Filip
      New Contributor II

      Hi, 

      Thank you for your reply. Yes I have tried it and unfortunately it didn't work.

      • TheJonG's avatar
        TheJonG
        Icon for OneStream Employee rankOneStream Employee

        I am not sure why that wouldn't work. Can you paste the entire XFBR rule script? I cannot see the Return value.

  • db_pdx's avatar
    db_pdx
    Valued 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