BPM with AND Conditions

Hello all,

I have been reading posts on this topic for a while and it seems like this should be fairly straightforward so I hope I’m missing something simple. My goal is to generate an email to notify me when a PO that I created is received.

I created a BPM with the Condition “The ttRcvHead.Received field has been changed from False to True” and that worked.

I preceded it with a Condition “Number of rows in the BuyID query is more or equal to 1” with Table Criteria of POHeader.BuyerID = “WTW1965” which is my BuyerID and I added an AND Operator to the original Condition.

Validation of the BPM is successful.

I have an email set up for True and False Conditions and when I receive a PO I get a successful and a “Failed” email. (one of each)

I created a BAQ (outside the BPM) to test the BuyerID query and it returns multiple records. (i.e BuyerID is more or equal to 1)

I will do a guide tomorrow unless someone beats me to it…

You MIGHT want to split that one condition widget into TWO widgets… Why? Because you are saying that

IF (Buyer = WTW1965 && RcvHead.Received Changed from False to TRUE)
     THEN: send email 1
     ELSE:  send email 2

So lets play that out… since this is an AND condition…
Set the BUYER to “ABC” and change Received from False to True - it will send email 2
Set the buyer to WTW1965 and RcvHead.Received changed from False to true - it will send email 2
Set the BUYER to “ABC” and change Received from True to False - it will send email 2
In other words, it will send email 2 no matter who the buyer is, and no matter what happens to the received value.

What you probably want is:

IF (buyer = WTW1965)
   then
   if RcvHead.Received Changed from False to TRUE)
     THEN: send email 1
     ELSE:  send email 2

this would take two widgets… with the first widget checking for the buyer, and the second widget (coming off the true side) checking for the Change of Received flag.

There You Go Yes GIF by CBS