I have a BPM query that checks whether a part revision is approved or not. This works in a normal BAQ by setting a table criteria to check whether the field “Approved” = “1”. When I do this in the BPM query editor (which looks very similar to the BAQ editor), I get the following error when saving the BPM:
“Error CS0019: Operator ‘==’ cannot be applied to operands of type ‘bool’ and ‘int’”
I tried setting the value to “true”, but that didn’t work either.
Are you certain your error is not with your “and” criteria? I just checked in the BAQ designer for 10.1.600.5 and it works using constant of 1 for the boolean checked compare , per screeshot below.
As I said in my initial post, this does work fine in the BAQ designer. The BAQ designer generates SQL code, and 1 works as a value in SQL with booleans. The query designer for BPMs looks a lot like the BAQ designer, but that operates on C#, which not only requires the “true” value for booleans, but is case-sensitive as well.