AlvaroSR
7 months agoNew Contributor II
Get WFScenario in Complex Expression Time Data Source
I am trying out a complex expression in Time Data Source. The issue is the next:
I have a Forecast scenario type with input frequency monthly and on the other hand I have a Long Term scenario type ...
- 7 months ago
Finally, I solved with the next script:
Dim vYear As String = args.Value
''Dim scenId As Integer = api.ScenarioTypeID
Dim scenId As Integer=api.CurrentDataClusterKey.ScenarioID
Dim scenType As ScenarioType = BRApi.Finance.Scenario.GetScenarioType(si,scenId)
''brapi.ErrorLog.LogMessage(si,sValue)
If (scenType.ToString = "LongTerm") Then
Return vYear
Else
Return vYear + "M12"
End IfMaybe someone has the same issue,
Thanks.