Skip to main content
Member
Jun 13, 2025 3:35 PM UTC
Solved

IC-Matching Confirmation Rule

Hi Everyone,

We are trying to incorporate the status of the IC-Matching Report into the Confirmation rule. While reviewing discussions on the community board, I found the following object: brapi.DataQuality.Status.GetICMatchingStatusItems. However, I am having trouble getting it to work in a script.

Could anyone share how they prevent users from confirming the workflow if the IC transactions do not match? Your insights would be greatly appreciated!

 

 

Member
Jun 18, 2025 4:28 PM UTC

We found the solution:

Dim icTable As DataTable = globals.GetObject(plugAccount & si.WorkflowClusterPk.ProfileKey.ToString & si.WorkflowClusterPk.ScenarioKey.ToString & si.WorkflowClusterPk.timekey.ToString)
If IsNothing(icTable)
    Dim ds As New DataSet
    'Execute the InterCoDifferences Method Command in code so that we can get the data table
    Dim methodQuery As String = "{|WFProfile|}{|WFScenario|}{|WFTime|}{" & plugAccount & "}{}{}{}{}{}{}{}{}{IsDifference = True}"
    
    Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
        ds = BRApi.Database.ExecuteMethodCommand(dbConnApp, XFCommandMethodTypeId.ICMatchingForWorkflowUnit, methodQuery, "IC", Nothing)
    End Using
    icTable = ds.Tables("IC")
    globals.SetObject(plugAccount & si.WorkflowClusterPk.ProfileKey.ToString & si.WorkflowClusterPk.ScenarioKey.ToString & si.WorkflowClusterPk.timekey.ToString,icTable)
End If

1 reply

RolandWeissAuthorAnswer
Member
Jun 18, 2025 4:28 PM UTC

We found the solution:

Dim icTable As DataTable = globals.GetObject(plugAccount & si.WorkflowClusterPk.ProfileKey.ToString & si.WorkflowClusterPk.ScenarioKey.ToString & si.WorkflowClusterPk.timekey.ToString)
If IsNothing(icTable)
    Dim ds As New DataSet
    'Execute the InterCoDifferences Method Command in code so that we can get the data table
    Dim methodQuery As String = "{|WFProfile|}{|WFScenario|}{|WFTime|}{" & plugAccount & "}{}{}{}{}{}{}{}{}{IsDifference = True}"
    
    Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
        ds = BRApi.Database.ExecuteMethodCommand(dbConnApp, XFCommandMethodTypeId.ICMatchingForWorkflowUnit, methodQuery, "IC", Nothing)
    End Using
    icTable = ds.Tables("IC")
    globals.SetObject(plugAccount & si.WorkflowClusterPk.ProfileKey.ToString & si.WorkflowClusterPk.ScenarioKey.ToString & si.WorkflowClusterPk.timekey.ToString,icTable)
End If