Forum Discussion
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.
- fellow_Ones3 years agoNew 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.
- Krishna3 years agoValued 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,
- EricOsmanski3 years ago
OneStream Employee
Are you able to post what you have in the selection changed arguments and also your XFBR rule? If I can see the details, I will be able to better assist you.
- fellow_Ones3 years agoNew Contributor III
Krishna , thank you. my requirement is to provide scenario as the drop down and that should trigger the workflow time change.
EricOsmanski thank you, below is what I am using
WFProfile=Manufacturing, WFScenario=|!TargetScenario!|, WFTime(ChangeWFTime,GetWorkflowStartTime)
If (args.FunctionName.Equals("ChangeWFTime", StringComparison.InvariantCultureIgnoreCase)) Then
Dim sScenarioName As String = "TargetScenario"
Dim parameterValue As String = ""
parameterValue = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, sScenarioName)
brapi.ErrorLog.LogMessage(si, "parameterValue: " & parameterValue)
Dim scenarioId As Integer = BRApi.Finance.Members.GetMemberId(si, DimType.Scenario.Id, "parameterValue")
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
Related Content
- 4 months ago
- 2 years ago
- 3 years ago
- 2 years ago
- 3 years ago