Forum Discussion

Marco's avatar
Marco
Contributor II
2 years ago
Solved

SetDataCells error: workflow settings do not allow input for Time member (not solved)

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

 

7 Replies

  • JackLacava's avatar
    JackLacava
    Community Manager

    You might want to specify how you're triggering this rule. Is it a Custom Calculation? A dashboard extender ? Something else?

    • Marco's avatar
      Marco
      Contributor II

      Is a dashboard extender

      • JackLacava's avatar
        JackLacava
        Community Manager

        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.