The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.

Forum Discussion

Alvaro's avatar
Alvaro
New Contributor III
2 years ago
Solved

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 ...
  • Alvaro's avatar
    2 years 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 If

     

    Maybe someone has the same issue,

    Thanks.