BPM Method Directive Incompatible Data Type Error


I’m building a step into an existing Method Directive BPM.
The validation error I received (see attached screenshot) was concerning the incompatibility of comparing a System.Int32 value (DMRHead.DMRNum) with a System.String value (UD06.Key1).

These are primary key values that connect the two tables, and there are no issues anywhere else in the system (BAQs, dashboards, screens, SQL server queries) when joining on these two columns.

How can I work around this issue? There’s no way to join the tables without these values connecting so I’m stumped as to how to go forward. Even if I wrote custom code to try and join the two tables, the data incompatibility issue may arise.

Does anyone have any suggestions on how to get around this issue?


What is the condition statement?

You probably have to cast the Key1 to an integer before comparing it to DMRNum

What I’ve done that seems to work is to create a variable intKey1 of type Integer. Then use a Set Argument/Variable widget to set that variable with
Then use that as a table condition in the Condition’s Query.

If you’r starting with the DMRNum and need to see if a matching UD06 record can be found, the your variable would be a string (say strDMRNum), with the Set Arg/Var widget as

Then you can use that as criteria to limit the UD06 table records

The Condition check is to test for OpenDMRs for the job in the JobEntry screen. If an Open DMR (in the DMRHead table) exists for a job in the UD06 table, then the job’s release is restricted.

The attached screenshot shows the condition being tested by the query.

Also, how can I cast values if I don’t have them identified yet?

I assume the condition’s query has something like:


Instead, remove that relationship and add a table criteria:

Here are the two table criteria and the join condition:

I think I understand what you’re trying to do now. Let me think about it.

Wouldn’t you need something like this:

The Query Designer in a BPM Condition only alows you to choose Column Names. You cant edit and add the cast() part.

I think the following will work

  1. Add a Variable of type DMR Processing Tableset:

  2. Add a Fill table by query widget with:
    The DMRHead subset query being:
    With the columns
    the configured mapping:

    with the expression for PurPoint being:

Now you have a copy DMRHead, where the PurPoint column actually holds the DMRNum, but as a string.

  1. In the condition, make the query:

    (note that UD06.Key1 is linked to DMRHead.PurPoint)
    And don’t forget to add the table criteria for jobNum to UD06

It saves without error, and I believe it should work. But I’m unable to test it.

1 Like

Thank you so much Calvin! This worked perfectly!
The only thing I changed was the column I used in the DMRHead table; instead of PurPoint I used DimCode, which was not used in our application.
Thanks again,