Time always returns 0001-01-01 in BR when using XFBR in Cube View
Hi,
I am calling a Business Rule (BR) in a Cube View using XFBR as follows:
XFBR( BR_ParamHelper, FunctionName, WFname = |WFText2|, SelectEntity = |!WF_AssignedEntity!|, Time = |!Time!| )
Inside the BR, I parse the year from Time to control flows:
Dim wfYear As Integer = 0
If args.NameValuePairs.ContainsKey("Time") Then
Dim POVTime As String = args.NameValuePairs("Time")
wfYear = CInt(Left(POVTime, 4))
End If
If wfYear >= 2026 Then
' Remove flows for specified entities
Else
' Keep historical flows
End If
Problem:
When I log POVTime or wfYear, it always shows 0001-01-01, so my logic for removing ENT/EXIT based on the year never triggers.
What I have tried:
Verified the Cube View POV is correctly set.
Passed Time = |!Time!| from the Cube View XFBR call.
Logged args.NameValuePairs("Time") — still returns 0001-01-01.
Question:
Is Time = |!Time!| the correct way to pass the POV period to a BR?
Is there a difference between |!Time!| and |!POV!| or T#POV in Cube Views for BRs?
How can I get the actual workflow year in the BR so I can apply logic like wfYear >= 2026?
Any guidance or examples on how to correctly get the year of the workflow/POV in a BR would be greatly appreciated.
Hi Manju, most easy is to use substitution variables to insert these kind of info into your BR.
Use the glasses on top and select Substitution Variables on the left bottom to see what is available. e.g. |POVTime|.
in this case you don't use ! but only the pipes.