Forum Discussion
That's the spirit.
I've tried this rule in the Dashboard XBFRString folder in business rules:
Imports System
Imports System.Data
Imports System.Data.Common
Imports System.IO
Imports System.Collections.Generic
Imports System.Globalization
Imports System.Linq
Imports Microsoft.VisualBasic
Imports System.Windows.Forms
Imports OneStream.Shared.Common
Imports OneStream.Shared.Wcf
Imports OneStream.Shared.Engine
Imports OneStream.Shared.Database
Imports OneStream.Stage.Engine
Imports OneStream.Stage.Database
Imports OneStream.Finance.Engine
Imports OneStream.Finance.Database
Namespace OneStream.BusinessRule.DashboardStringFunction.YearsList
Public Class MainClass
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As Object
Try
If args.FunctionName.XFEqualsIgnoreCase("Yearlist") Then
Dim CurrentTimeId As Integer = api.Pov.Time.MemberPk.MemberId
Dim CurrentYear As Integer = api.Time.GetYearFromId(CurrentTimeId)
If (CurrentYear < 2022) Then
Return CurrentYear
End If
End If
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
Return Nothing
End Function
End Class
End Namespace
Then, I entered this formula in the frequency field:
T#2022M9.AllPriorInYear, T#XFBR(Yearlist, CurrentYear).Base
But it doesn't work
Related Content
- 10 months ago
- 4 years ago
- 10 months ago
- 3 years ago