01-29-2024 10:21 AM - edited 01-29-2024 10:58 AM
Hello again, it seems that the error was not completely corrected, so I have the same problem as my previous post.
Scenario 'Forecast 2023M10’s workflow settings do not allow input for Time member ‘2023M9’.
I know this is a bit strange, but I need to modify values from the previous month. For example, now that I’m in November, I want to affect September. In February, it allows me to make these modifications because it’s still possible, but I want to do the same for the following months. The function value gives me as a form and I believe it is necessary to pass it to import, but I have no idea how to do it.
For Each strItem As String In ({"Amount", "Annotation"})
Dim listTargetDC As New List(Of DataCellEx)
For Each drResult As DataRow In dtResult.Rows
Dim dcpkTarget As DataCellPk = drResult("DataCellPk")
If strItem.Equals("Annotation") Then
dcpkTarget.ViewId = BRApi.Finance.View.GetIdFromName(si, "Annotation")
End If
Dim dcTarget As New DataCell(dcpkTarget, drResult("Amount"), DataCellStatus.CreateDataCellStatus(False, False))
Dim dcexTarget As New DataCellEx(
dcTarget, drResult("Annotation"),
DimConstants.Local,
BRApi.Finance.Account.GetAccountType(si, dcTarget.DataCellPk.AccountId).Id
)
listTargetDC.Add(dcexTarget)
Next
'Value example: [Entity1: (Source Value -362,712.29 * PctSplit 100.00 %) * (Driver Value 1.00 / Driver Total 1.00) * FxRate 1.0000 * Alloc Sign 1]
Try
BRApi.Finance.Data.SetDataCells(dbConnFW, dbConnApp, listTargetDC)
Catch ex As Exception
BRApi.ErrorLog.LogMessage(si, "Erro3: " & ex.Message)
End Try
listTargetDC.Clear
Next
Solved! Go to Solution.
01-29-2024 05:28 PM - edited 01-29-2024 05:30 PM
You can trigger the DM job from the rule, there are examples scattered across these forums. You can also try triggering the Custom Calc directly from a button, I've not tested it.
I don't think you'll be able to use direct data-manipulation APIs from a dashboard extender for those periods, if the Dashboard is executed as a Workspace step in Workflow, because (as you've seen) the Workflow controls will kick in.
Edit: sorry, re-reading, you mean changing the Scenario property that defines the noinput periods? That might trigger even worse things and force you to reset the scenario, losing all data for that Scenario in the year. Big no-no.
01-29-2024 11:31 AM
You might want to specify how you're triggering this rule. Is it a Custom Calculation? A dashboard extender ? Something else?
01-29-2024 11:32 AM
Is a dashboard extender
01-29-2024 11:46 AM
Ok. Can you post your Scenario configuration too? Forecast scenarios are often set with Range frequency; I suspect you can't bypass that from Dashboard Extenders executed in a Workflow step, you might have to use a Custom Calc instead.
01-29-2024 11:48 AM
01-29-2024 11:54 AM - edited 01-29-2024 11:56 AM
Yeah that's what I thought. M9 falls into the "no input periods", so you can't write directly to it in a workflow context.
A workaround that I believe will work:
Note that this goes against the spirit of Workflow configurations, so from an auditing perspective it's not great - you're declaring in Scenario settings that workflows won't change previous periods, and then you do it anyway - but at least you should get some traces from the DM job (Custom Calcs often don't leave any trace).
01-29-2024 01:27 PM
Is there a way to change that noinput value in the BR?
01-29-2024 05:28 PM - edited 01-29-2024 05:30 PM
You can trigger the DM job from the rule, there are examples scattered across these forums. You can also try triggering the Custom Calc directly from a button, I've not tested it.
I don't think you'll be able to use direct data-manipulation APIs from a dashboard extender for those periods, if the Dashboard is executed as a Workspace step in Workflow, because (as you've seen) the Workflow controls will kick in.
Edit: sorry, re-reading, you mean changing the Scenario property that defines the noinput periods? That might trigger even worse things and force you to reset the scenario, losing all data for that Scenario in the year. Big no-no.