The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
calvinbruch
2 years agoNew Contributor
Time member driven by Workflow Scenario
I am trying to create a business rule which returns a time member driven by the Workflow scenario member. My forecast scenario members are structured as Jan_Fcst, Feb_Fcst...Dec_Fcst. For instance, D...
Omkareshwar
2 years agoContributor
Hi Calvin,
You can use this syntax to call the XFBR business rule.
BRString(YourRuleName, YourFunctionName)
You can use this syntax to debug BRapi.ErrorLog.LogMessage(si, "Message You want to print on the errorlog", "")
If args.FunctionName.XFEqualsIgnoreCase("YourFunctionName") Then
Dim myWorkflowUnitPk As WorkflowUnitPk = BRApi.Workflow.General.GetWorkflowUnitPk(si)
Dim wfYear As Integer = BRApi.Finance.Time.GetYearFromId(si, myWorkflowUnitPk.TimeKey)
Dim wfScenarioName As String = ScenarioDimHelper.GetNameFromID(si, si.WorkflowClusterPk.ScenarioKey)
If wfScenarioName.XFContainsIgnoreCase("Jan")
Return $"{wfYear}M1"
Else If wfScenarioName.XFContainsIgnoreCase("Feb")
Return $"{wfYear}M2"
End If
End IfYou can use the above function for your use case you can modify it as per your specific requirement.
Thanks, Omkareshwar
Archetype Consulting
Related Content
- 7 months ago
- 1 year ago
- 2 years ago