Forum Discussion

Yaseen's avatar
Yaseen
New Contributor III
2 years ago

Selection changed POV Arguments

hello -

I have the Workflow start time and Workflow end time set on the Scenario. I am trying to change WF POV from Dashboard component Combo box by passing Scenario as parameter. scenario is changing but the year is not, i need workflow start year dynamically updated along with scenario. Any inputs on how to get the Workflow start year changed along with Scenario is appreciated.

 

below are my settings under Actions section

Selection changed POV Action: Change Workflow

Selection changed POV Arguments: WFScenario=|!MyWFScenario!|

  • EricOsmanski's avatar
    EricOsmanski
    Valued Contributor

    You should be able to do this with a BRString. I tested the below and it was successful:

    WFProfile=WFProfileName, WFScenario=ScenarioName, WFTime=XFBR(RuleName,GetWorkflowStartTime)

    In a Dashbaord XFBRString BR:

    If (args.FunctionName.Equals("RuleName", StringComparison.InvariantCultureIgnoreCase)) Then
    Dim scenarioId As Integer = BRApi.Finance.Members.GetMemberId(si, DimType.Scenario.Id, "ScenarioName")
    Dim wfStartTime As Integer = brapi.Finance.Scenario.GetWorkflowStartTime(si, scenarioId)
    Dim wfStartYear As Integer = BRApi.Finance.Time.GetYearFromId(si, wfStartTime)
    Return BRApi.Finance.Time.GetNameFromId(si, wfStartYear)
    End If

    You can make this more dynamic by passing in the scenario to the BR using a parameter, variable, etc, but did not for the simple purpose of showing how it could work.

    • Yaseen's avatar
      Yaseen
      New Contributor III

      EricOsmanski , thanks much for sharing. For some reason for me the XFBRString BR is not executing. I tried passing Business rule name, along with Function name and variable name with no luck. I tried different ways but couldn't make it work. Any tips much appreciated.

      • Krishna's avatar
        Krishna
        Valued Contributor

        It is working for me as well, I passed the below in the ComboBox. 

        WFProfile=|!CC_PARAM_WF!|,WFScenario=Forecast,WFTime=XFBR(WFPOV,GetWorkflowStartTime)

        I think the issue is when you are making Scenario as a dropdown then it is not working. 

         

        Hope this helps,