Bpm not working as expected

, ,

Having an issue with, what seems like a simple condition, statement. Here is my Method Directive.

All I’m trying to do is see if the material description contains the word “Glass” But it keeps returning false image

instead of all rows, use “changed” rows which means Updated OR Added. Because “All Rows” would include also the Unchanged Row which is the row before the change and Glass would not be contained within it.

Also you are doing this on GetNewJobMtl… I dont think the JobMtl comes in with a Description out of the gate… you might have to do it on the Update?

1 Like

In the message box, do a table or field query, (right click in the message box, there are options there) and it will give some options so that you can see what is coming back. It really helps with troubleshooting.

And I agree with @hkeric.wci, you will probably need to put this on update.

I concur with these two gents. The GetNew doesnt actually do anything other than slap a new row in your dataset. The real magic happens OnUpdate where RowMod = “A” (added)

1 Like

OK made suggested changes. But still returning false.


image
It doesn’t appear to be returning anything.
image
Below is the actual job record.

I am adding the last line by doing a “Past Insert” if that makes a difference.

try it on the pre-processing.

Try making that “changed row” instead of updated so it will trigger on a new (added) row or an updated (existing) row.

Joe

And, yes, on the pre-processing as Brandon said.

Joe

Another thing to think about is, it’s probably a better solution to make the part number non-stock, and the purchase direct will be check automatically, and you won’t have to mess with it on the Job.

Try adding more debug info into the messagebox… display the actual contents of the Description field, as well as the RowMod field to make sure that you are getting what you truly expect to get.

Pre-Process did it! Thanks guys!!!

2 Likes

Can I ask why you don’t just make the parts non-stock?

Or are you not messing with buyit ? (maybe I am just getting confused from the other thread)

All the parts are created by an outside configurator and then added to the job.So actually none of the parts are even in the parts master. So when users have to manually add material it always defaults to purchase direct when, in fact, the only thing that gets purchased direct is glass. So the intention is to uncheck the purchase direct check box for everything except glass.

If it’s not purchase direct, it has to come from inventory. If it has to be in inventory it has to be in the part master.

edit: I guess that’s not 100% true. You could have make direct jobs where you have whole strings of jobs all with on the fly part numbers. But that seems like a pain to me anyways…

If you do make the BPM, I’m pretty sure you will have to handle the Make Direct checkbox as well.

So if it’s not in the master it has to be direct something.