BPM Condition contains wildcard

I’ve written a BPM that send up an exception when certain part numbers are entered on Sales Orders, based on our part number nomenclature. Unfortunately, over the years this nomenclature hasn’t been strictly adhered to, so I’m having to get “extra” to exclude the correct parts and cannot get a wildcard to work correctly in a condition.

For example, a standard part number may be something like A1454C-3-CI, where the “-3-” refers to the part category. Those are easy to exclude. However, there’s also ones like A1454C-3PBA-CI, so I’m trying to get it to trigger on part numbers that contain “-3%-”, but that string doesn’t work. It doesn’t like my percent sign between the 3 and the dash. Works great in a BAQ, but can’t get it to work in the BPM, even though it doesn’t throw any syntax errors.

Is there a different wildcard that I should be using than % (already tried both * and ^ to no different results).

1 Like

Is there a way you can add to the part record itself some sort of value you want to filter on? That might be cleaner

It’s a decent thought, but then I could run into the same problem trying to automate that field getting populated when new parts that fit the criteria are entered. And we have new parts created all the time, so manually trying to manage a UD field isn’t scalable.

What’s your BPM code look like?

I’m strictly using a Condition widget using the “specified field of the … row(s) contains the specific expression” option, with my expression being “-3%-” (or other usual wildcard characters in place of the percent sign).

In my BAQ I used on the Part table the criteria PartNum LIKE %-3[a-z]%-% constant. I tried that particular expression in my BAQ, too, but it also didn’t work.

I think you should be able to use a regular expression in a bpm. Are you unable to write any code or are you just trying to stick to widgets only?

Check out this thread:
BPM Condition phrases - ERP 10 - Epicor User Help Forum (epiusers.help)

1 Like

I think this is exactly what I need.

I don’t know code, so was hoping that it would be fairly simple as it was in the BAQ. Some online searching I did and an error I got during one test of my attempt made me think that the regular expression was the way to go, but couldn’t find anything that made any sense to me. So far looking over the link you provided, I think that might put me on the right path. I’ll give it a shot!

1 Like