AutoPrint logic not working as expected

I have some customer specific labels I’m trying to generate when a UD Checkbox is flagged. I have an AutoPrint data directive against the ShipHead table set up for each specific label and then for customers that don’t have a specific label format, I call a generic label. However, whenever I cause the AutoPrint BPM to fire by checking the checkbox the generic label is always output along with the customer specific label. Can any of you see the flaw in my logic below?

The customer specific AutoPrint label condition is:

The ttShipHead.CheckBox10 field has been changed from False to True
AND The ttShipHead.CustNum field of all rows is equal to the 67 expression

The generic AutoPrint label condition is:

The ttShipHead.CheckBox10 field has been changed from False to True
AND ( The ttShipHead.CustNum field of all rows is not equal to the 67 expression
OR The ttShipHead.CustNum field of all rows is not equal to the 1125 expression
OR The ttShipHead.CustNum field of all rows is not equal to the 93 expression )

If anyone has done this in an easier fashion (or one that works) I’m open to suggestions.

Thanks!
10.1.700.4

Have you tested using “the changed row” instead of “all rows”? If I am reading this right, by changing this it should work correctly.

I just tested and my results were the same. Both labels printed. This has been quite the vexing issue for me.

Could you paste in a screenshot of your designer view so I can see from start - finish the logical flow?

What I have below works sans the auto-print object. The first condition checks if equal to Customer A and if the UD checkbox was flagged. If true it fires a custom code object that displays a message that path 1 was chosen. If the first condition is false it checks the second condition that looks at the UD field being checked and two different customer numbers. This works perfectly and makes me wonder if the auto-print object is not setup correctly vs. the conditions. All of this assumes you have it setup kind of the same.

Another wrinkle. I just tested with only one customer excluded for the generic label and the generic label didn’t print. This is the desired action. The problem occurred when I added a second customer to exclude. Once I added the second customer, the generic label printed again. Basically, my goal is to have all the customers listed here that have customer specific formatted labels so that if it’s not one of these customers, the generic box label will print. Perhaps my syntax for the prefix/postfix parentheses is incorrect?

[cid:image001.jpg@01D2B3BF.9B4E6FA0]

You should have AND instead of OR in the third line.

1 Like

That fixed it. I appreciate the assist!

Great, sorry I did not catch it right away, my eyes must have been tired. Just curious about having the two conditions. Would it not just be a single condition that looks for Customers that get the specific labels, if true, and, if false, they get generic?

My original plan was to have one giant AutoPrint BPM that had all the conditions that would filter through one at a time and then if a customer specific condition wasn’t met, it would print the generic label. At some point, someone from Epicor advised against this method. So, I have set up multiple BPMs for each customer. If true, then it prints. If false, nothing. Then, I have BPM that tests for any of these customers and if it’s not them, then it prints the generic version. Since this is working now, I may go back and try to get the large BPM working.

Thanks again.

Hi! I have an autoprint set up to determine which label to print and then to send an email if there is no defined autoprint. We have added a part number to the BOM which is the label name and I wrote a BPM which stores this specific part number to a UD field (based on criteria.) Autoprint is setup such that if the UD field equals part A (label part number) then print label A, part B then print label B, etc. Why did Epicor suggest not doing it that way? It works fine for me so I’m confused why it’s an issue?