Forum Discussion
Your current issue I think is your trying to use an api in a XFBR rule. XFBR rules can not use those. I tested the follow and it works.
T#2022M9.AllPriorInYear, XFBR(YearsList,Yearlist, BaseYr=2022)
--------------------------
Imports System
Imports System.Collections.Generic
Imports System.Data
Imports System.Data.Common
Imports System.Globalization
Imports System.IO
Imports System.Linq
Imports System.Windows.Forms
Imports Microsoft.VisualBasic
Imports OneStream.Finance.Database
Imports OneStream.Finance.Engine
Imports OneStream.Shared.Common
Imports OneStream.Shared.Database
Imports OneStream.Shared.Engine
Imports OneStream.Shared.Wcf
Imports OneStream.Stage.Database
Imports OneStream.Stage.Engine
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 sBaseYr As String = args.NameValuePairs.XFGetValue("BaseYr")
Return "T#YearPrior1(" & sBaseYr & ").Months, T#YearPrior2(" & sBaseYr & ").Months, T#YearPrior3(" & sBaseYr & ").Months, T#YearPrior4(" & sBaseYr & ").Months, T#YearPrior5(" & sBaseYr & ").Months, T#YearPrior6(" & sBaseYr & ").Months, T#YearPrior7(" & sBaseYr & ").Months"
End If
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
End Class
End Namespace
- Sophie3 years agoNew Contributor
It worked in the Frequency filter?
Related Content
- 10 months ago
- 4 years ago
- 10 months ago