Forum Discussion

GW's avatar
GW
New Contributor II
2 years ago

Using ParamHelper for CubeViews (Scenario driven by Time Selected)

Hi,   I am currently working on creating a ParamHelper business rule to be used in a CubeView. The goal is to have the S#scenario driven by the time dimension parameter selected by the user, rather...
  • RobbSalzmann's avatar
    2 years ago

    The code you posted will return as follows:
    S#Projection1 for periods M1, M2, M3, M10, M11, and M12.
    S#Projection2 for periods M4, M5, M6
    S#Projection3 for periods M7, M8, M9
    S#Projection4  - never

    The code will never return "S#Projection4" because that If statement will never get called. See my first comment. above.

    You have a couple choices.  Use .EndsWith() or put this evaluation first:
    If wfTime.Contains("M10") Or wfTime.Contains ("M11") Or wfTime.Contains ("M12") Then
    Return "S#Projection4"