Forum Discussion
1 Reply
- OSAdminValued Contributor IIOriginally posted by Chul Smith
you can use a XFBR rule in Col2. Send the scenario parameter to the rule and return the time needed. this might fall into the category where you can't drive this via a parameter. Last thing to try would be to use |!ParamScenLastYear!|
This works, but I decided to pass the time filter in to be sure of the outcome:
If args.FunctionName.XFEqualsIgnoreCase(""ScenarioChange"") Then
Dim paramScenarioValue As String = args.NameValuePairs.XFGetValue(""ParamScenLastYear"")
Dim paramid As Integer = BRApi.Finance.Members.GetMemberId(si, 2 , paramScenarioValue)
Dim povtime As String = args.NameValuePairs.XFGetValue(""POVtimeFilter"")
Dim nowyear As Integer = TimeDimHelper.GetSubComponentsFromName(povtime).Year 'year number of current year
Dim curMonth As Integer = TimeDimHelper.GetSubComponentsFromName(povtime).Month 'Month number of current month
Dim lastyear As Integer = nowyear -1
Dim povtimey As String = lastyear & ""M"" & curMonth
If paramid = 1048578 Then ' 1048578 is the id of Scenario ""Act_Cur_Tar""
Return ""T#"" & povtimey
Else
Return ""T#"" & povtime
End If
End If
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
The pop-up for Scenario shows the description and they are renaming metadata, so I prefer to use the ID here
Corresponding BR with extra time:
BRString( GMR_PeriodFilterForScenario, ScenarioChange, ParamScenLastYear = |!ParamScenLastYear!|, POVtimeFilter = |povtime| ):S#|!ParamScenLastYear!|
Related Content
- 2 years ago
- 2 years ago