Skip to main content
Member
Apr 11, 2023 4:43 PM UTC

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!|

5 replies

Employee - Mentor
Apr 12, 2023 1:18 PM UTC

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.

Member
Apr 13, 2023 8:02 PM UTC

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.

Expert
Apr 14, 2023 1:00 AM UTC

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,