Forum Discussion

Filip's avatar
Filip
New Contributor II
12 days ago

How to create a text box in Dashboard - text is dependent on WF Scenario

Hi,

I have created an admin dashboard for forecast. I want a text box that shows parameter values, but there is a separate parameter for each Scenario.

ScenarioParameter
Forecast_MarCopyLatestActualsToFCT_Mar
Forecast_JunCopyLatestActualsToFCT_Jun
Forecast_SepCopyLatestActualsToFCT_Sep
Forecast_Dec

CopyLatestActualsToFCT_Nov
CopyLatestActualsToFCT_Dec

The parameter has either value False/True and depending on the value, the business rules that are initiated via the dashboard will do different things. 

The dashboard is shared between the WFs/Scenarios.

How do I create a text box that gives me the parameter name and value?
e.g. when I use WF Forecast_Mar I want the textbox to say: "Forecast_Mar = (Value)"
December has double parameters why I need both to be shown, "Forecast_Nov = (Value), Forecast_Dec =  (Value)".

Is it possible to do this using standard functionality for parameters (e.g. create a new parameter that picks the values from the others that I then link in my dashboard). I have tried to create a BR, but I couldn't really get it to work in a good way and then something happened in OneStream so it reverted almost everything I had written in the Business rule.

  • Jones's avatar
    Jones
    New Contributor III

    Hi,

    If i understand you correctly I don't believe there are any built in functions for this. I would go the XFBR root.

    In your dashboard text field like a lable, add the text "XFBR(YourXFBRname, ScenarioSelection)"

    And in your XFBR Rule continue on below logic, that will pass the parameter value based on the end user workflow scenario selection. 

    If args.FunctionName.XFEqualsIgnoreCase("ScenarioSelection") Then


            Dim wfScenarioName As String = ScenarioDimHelper.GetNameFromID(si, si.WorkflowClusterPk.ScenarioKey)
            
            If wfScenarioName = "Forecast_Mar" Then 
            Return "|!CopyLatestActualsToFCT_Mar!|"
            
            Else if wfScenarioName = "Forecast_Dec" Then
            Return "|!CopyLatestActualsToFCT_Nov!| |!CopyLatestActualsToFCT_Dec!|"
            
            End If