yesterday
Hello,
I am wondering if anyone would be will to help me with a business rule for our people planning. I am not sure how to read these, but I am trying to determine where in the rule it's telling which periods to calculate. For some reason it's not calculating all the periods.
If anyone could help, please send me a message and let me know if you could point me in the right direction.
yesterday
Hi aorange,
Can you not share more detail here? This is what the community forums are for rather than taking things offline. Help, if offered, is offered with the understanding that it is free for all with access to the forums to learn from.
There are a few places your period limitation could be coming from:
1. People Planning settings, e.g., default plan start/end period, plan period scenario settings. This might be the case if it is the start or end periods not getting calculated.
2. Calculation Plan Period Filter or Conditional Execution Statement conditions
3. If it is a BR being used in the allocation method (which it sounds like it is), then the logic in that BR. It might be a period limitation or it might be that the calculations in certain periods just equate to 0.
If you have ruled out the first 2 options I would suggest sharing the code that is being executed (ensuring to remove anything confidential)
Regards,
Daniel
yesterday
Hi Daniel,
Thank you for the reply. The calculation is pointing to a business rule. I wasn't sure what to look for in the rule and didn't want to post the entire rule, it's quite long.
How it's currently working is it's calculating period 1 and then skipping periods that would be actuals. There is a period filter, but it's always calculated all 12 periods in the past. We moved to a rolling forecast and I think something was overlooked in the process.
Here is the period filter:
Are there some keywords or expressions I should look for in the business rule? I am wondering if it has something to do with this? I apologize I don't know business rules. Any push in the right direction would be greatly appreciated.
yesterday
That code looks like the out of the box rule in PLP_ParamHelper and there doesn't appear to be anything limiting the calc to periods there.
PPerCount is the number of plan periods. Have you checked in your PLP Settings for the plan periods settings?
Which periods are being calculated and which aren't (that you expect to be calculated)?
FYI there are some code forum tags which are better to use than posting screenshots of code.
yesterday
I would like all 12 periods to calculate. I compared the out of the box rule to our custom rule and there's only two sections that appear to be different.
Here is one of them:
Public Function GetDriverValue(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As String
Try
'Get WFCluster Criteria Values
Dim scenarioName As String = ScenarioDimHelper.GetNameFromId(si, si.WorkflowClusterPk.ScenarioKey)
Dim timeName As String = TimeDimHelper.GetNameFromId(si.WorkflowClusterPk.TimeKey)
'Get the Dimension members to locate the driver
Dim entityMember As String = args.NameValuePairs.XFGetValue("entityMember").ToString.Replace("'","")
Dim accountMember As String = args.NameValuePairs.XFGetValue("accountMember").ToString.Replace("'","")
Dim ud1Member As String = args.NameValuePairs.XFGetValue("ud1Member").ToString.Replace("'","")
Dim periodNumber As String = args.NameValuePairs.XFGetValue("periodNumber").ToString.Replace("'","")
Dim viewMember As String = args.NameValuePairs.XFGetValue("viewMember").ToString.Replace("'","")
'Dim ud2Member As String = args.NameValuePairs.XFGetValue("ud2Member").ToString.Replace("'","")
If entityMember = Nothing Then entityMember = "None"
If accountMember = Nothing Then accountMember = "None"
If ud1Member = Nothing Then ud1Member = "None"
'If ud2Member = Nothing Then ud2Member = "None"
'Build the member string
Dim memberString As String
memberString = "E#" & entityMember
memberString = memberString & ":C#Local"
memberString = memberString & ":S#" & scenarioName
memberString = memberString & ":T#" & timeName & "M" & periodnumber
memberString = memberString & ":V#" & viewmember
memberString = memberString & ":A#" & accountMember
memberString = memberString & ":F#None:O#Top:I#None"
memberstring = memberString & ":U1#" & ud1Member
'memberstring = memberString & ":U2#" & ud2Member
memberstring = memberString & ":U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None"
'brapi.ErrorLog.LogMessage(si,memberstring)
Return BRApi.Finance.Data.GetDataCellUsingMemberScript(si, "BudgetDrivers", memberString).DataCellEx.DataCell.CellAmount.ToString
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
Public Function GetDriverValueInt(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As String
Try
'Get WFCluster Criteria Values
Dim scenarioName As String = ScenarioDimHelper.GetNameFromId(si, si.WorkflowClusterPk.ScenarioKey)
Dim timeName As String = TimeDimHelper.GetNameFromId(si.WorkflowClusterPk.TimeKey)
'Get the Dimension members to locate the driver
Dim entityMember As String = args.NameValuePairs.XFGetValue("entityMember").ToString.Replace("'","")
Dim accountMember As String = args.NameValuePairs.XFGetValue("accountMember").ToString.Replace("'","")
Dim ud1Member As String = args.NameValuePairs.XFGetValue("ud1Member").ToString.Replace("'","")
Dim periodNumber As String = args.NameValuePairs.XFGetValue("periodNumber").ToString.Replace("'","")
Dim viewMember As String = args.NameValuePairs.XFGetValue("viewMember").ToString.Replace("'","")
'Dim ud2Member As String = args.NameValuePairs.XFGetValue("ud2Member").ToString.Replace("'","")
If entityMember = Nothing Then entityMember = "None"
If accountMember = Nothing Then accountMember = "None"
If ud1Member = Nothing Then ud1Member = "None"
'If ud2Member = Nothing Then ud2Member = "None"
'Build the member string
Dim memberString As String
memberString = "E#" & entityMember
memberString = memberString & ":C#Local"
memberString = memberString & ":S#" & scenarioName
memberString = memberString & ":T#" & timeName & "M" & periodnumber
memberString = memberString & ":V#" & viewmember
memberString = memberString & ":A#" & accountMember
memberString = memberString & ":F#None:O#Top:I#None"
memberstring = memberString & ":U1#" & ud1Member
'memberstring = memberString & ":U2#" & ud2Member
memberstring = memberString & ":U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None"
'brapi.ErrorLog.LogMessage(si,memberstring)
'11/11/19 Commented out for #INC0039191 - when Jan/Feb/March are indicated in the cube view, the values are translated to 10/11/12 in the database
'and then this original code is returning only the left 1 digit. Replacing with the code below which instead uses the math.round function
'math.Round the cell amount to 0 decimals
'Return left(BRApi.Finance.Data.GetDataCellUsingMemberScript(si, "BudgetDrivers", memberString).DataCellEx.DataCell.CellAmount.ToString, 1)
Return math.Round(BRApi.Finance.Data.GetDataCellUsingMemberScript(si, "BudgetDrivers", memberString).DataCellEx.DataCell.CellAmount,0).ToString
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
Public Function GetDriverValueGlobal(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As String
Try
'Get WFCluster Criteria Values
Dim scenarioName As String = ScenarioDimHelper.GetNameFromId(si, si.WorkflowClusterPk.ScenarioKey)
Dim timeName As String = TimeDimHelper.GetNameFromId(si.WorkflowClusterPk.TimeKey)
'Get the Dimension members to locate the driver
Dim entityMember As String = args.NameValuePairs.XFGetValue("entityMember").ToString.Replace("'","")
Dim accountMember As String = args.NameValuePairs.XFGetValue("accountMember").ToString.Replace("'","")
Dim ud1Member As String = args.NameValuePairs.XFGetValue("ud1Member").ToString.Replace("'","")
Dim periodNumber As String = args.NameValuePairs.XFGetValue("periodNumber").ToString.Replace("'","")
Dim viewMember As String = args.NameValuePairs.XFGetValue("viewMember").ToString.Replace("'","")
'Dim ud2Member As String = args.NameValuePairs.XFGetValue("ud2Member").ToString.Replace("'","")
If entityMember = Nothing Then entityMember = "None"
If accountMember = Nothing Then accountMember = "None"
If ud1Member = Nothing Then ud1Member = "None"
'If ud2Member = Nothing Then ud2Member = "None"
'Build the member string
Dim memberString As String
memberString = "E#" & entityMember
memberString = memberString & ":C#Local"
memberString = memberString & ":S#" & scenarioName
memberString = memberString & ":T#" & timeName & "M" & periodnumber
memberString = memberString & ":V#" & viewmember
memberString = memberString & ":A#" & accountMember
memberString = memberString & ":F#None:O#Top:I#None"
memberstring = memberString & ":U1#" & ud1Member
'memberstring = memberString & ":U2#" & ud2Member
memberstring = memberString & ":U2#Global:U3#Global:U4#None:U5#None:U6#None:U7#None:U8#None"
'brapi.ErrorLog.LogMessage(si,memberstring)
BRApi.ErrorLog.LogMessage(si, BRApi.Finance.Data.GetDataCellUsingMemberScript(si, "BudgetDrivers", memberString).DataCellEx.DataCell.CellAmount.ToString)
Return BRApi.Finance.Data.GetDataCellUsingMemberScript(si, "BudgetDrivers", memberString).DataCellEx.DataCell.CellAmount.ToString
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
Public Function GetDriverValueFinancial(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As String
Try
'Get WFCluster Criteria Values
Dim scenarioName As String = ScenarioDimHelper.GetNameFromId(si, si.WorkflowClusterPk.ScenarioKey)
Dim timeName As String = TimeDimHelper.GetNameFromId(si.WorkflowClusterPk.TimeKey)
'Get the Dimension members to locate the driver
Dim entityMember As String = args.NameValuePairs.XFGetValue("entityMember").ToString.Replace("'","")
Dim accountMember As String = args.NameValuePairs.XFGetValue("accountMember").ToString.Replace("'","")
Dim ud1Member As String = args.NameValuePairs.XFGetValue("ud1Member").ToString.Replace("'","")
Dim periodNumber As String = args.NameValuePairs.XFGetValue("periodNumber").ToString.Replace("'","")
Dim viewMember As String = args.NameValuePairs.XFGetValue("viewMember").ToString.Replace("'","")
'Dim ud2Member As String = args.NameValuePairs.XFGetValue("ud2Member").ToString.Replace("'","")
If entityMember = Nothing Then entityMember = "None"
If accountMember = Nothing Then accountMember = "None"
If ud1Member = Nothing Then ud1Member = "None"
'If ud2Member = Nothing Then ud2Member = "None"
'Build the member string
Dim memberString As String
memberString = "E#" & entityMember
memberString = memberString & ":C#Local"
memberString = memberString & ":S#" & scenarioName
memberString = memberString & ":T#" & timeName & "M" & periodnumber
memberString = memberString & ":V#" & viewmember
memberString = memberString & ":A#" & accountMember
memberString = memberString & ":F#None:O#Top:I#None"
memberstring = memberString & ":U1#" & ud1Member
'memberstring = memberString & ":U2#" & ud2Member
memberstring = memberString & ":U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None"
'brapi.ErrorLog.LogMessage(si,memberstring)
Return left(BRApi.Finance.Data.GetDataCellUsingMemberScript(si, "Financial", memberString).DataCellEx.DataCell.CellAmount.ToString, 1)
'Ref INC0039191 - you may need to comment out the above as well (see line 382) and replace with the below
'Return math.Round(BRApi.Finance.Data.GetDataCellUsingMemberScript(si, "Financial", memberString).DataCellEx.DataCell.CellAmount,0).ToString
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
And here is the other:
'Retrieve a driver value based on the Entity and Account provided for the current Workflow Scenario and year M1 period
'GetDriverValue functions migrated by OneStream AAS after PLP upgrade - 10/10/22
Else If (args.FunctionName.XFEqualsIgnoreCase("GetDriverValue")) Then
Return Me.GetDriverValue(si, globals, api, args)
Else If (args.FunctionName.XFEqualsIgnoreCase("GetDriverValueInt")) Then
Return Me.GetDriverValueInt(si, globals, api, args)
Else If (args.FunctionName.XFEqualsIgnoreCase("GetDriverValueGlobal")) Then
Return Me.GetDriverValueGlobal(si, globals, api, args)
Else If (args.FunctionName.XFEqualsIgnoreCase("GetDriverValueFinancial")) Then
Return Me.GetDriverValueInt(si, globals, api, args)
I'm just not sure what to look for. For example I am doing a period 6 forecast and it's calculating period 1, skipping 2-5 and calculating 6-12. If this is too much to look at I understand and I can put in a case for some consulting time.
10 hours ago
When you look at the "Plan Data" tab can you see all the periods being calculated or just ones you mentioned?
2 hours ago - last edited 2 hours ago
It's only calculating the ones I mentioned on the plan data tab. Also it changes each month. So last month period 1 calculated then it skipped 2-4 and calculated 6-12. The periods are still in the data tab for each period it's just that the Amount is 0 for those periods.