BPM directive to override base method variable

Newbie here. Is it possible to set a method parameter in pre-processing such that base observes the changed parameter value? For example, If I want to change parameter vPartNum in GenerateNewLotNum such that the base method gets next lot for a different Part, how to? I tried what seems obvious (a set var action in preprocessing directive) but it seems base is still getting the original calling PartID.

Have you tried setting up your lots so they are not part specific, that sounds like what you are looking to do, have a pool of parts that generate Lots from the same pool.

Thanks for your reply.

The purpose of my question is two-part:

  1. to learn about BPM pre-base-post patterns
  2. yes, to simplify global lot sequence maintenance.

Global lot sequence is what we want but it leaves a lot to be desired since you must set non-part specific and 5 other fields on every part master. Seems to defeat the purpose, IMO. Not to mention the date code should be leading not trailing for a meaningful sort.

The idea is to set those fields on a dummy
part and conditionally use that part on GenerateNewLotNum.

Setting it in pre should work for what you want to do.

Maybe you set something incorrectly.

I am having a hard time seeing why you’d want to though.

I re-read it and I’m square now.

1 Like

Thanks Kevin. I’ll double check my work.

I saw your GetNextSequence function and may check that out too as it may help with our desire to auto-reset the counter periodically but just banging around on options at this point.

I think I know what’s going on. Maybe?

Did you save the lot?

I think you’ll need to call update with that lot before it’ll do a new one again.

Haven’t completely verified, but most likely:

LotSelectUpdate.GenerateNewLotNum
LotSelectUpdate.GetNewPartLot
LotSelectUpdate.Update

Repeat…

Going back to your original problem, a bpm to set these options by default may be the better answer, depending.

Right. I’ll be a mix as I don’t like the trailing date code and inability to auto-reset counter. So may just default Lot Tracked = True and another indicator to override - depends.

1 Like

All I did was conditionally set var vPart to my dummy part number.


thinking the base would use that value(?) Should it?
If yes, then I need to debug my conditions.

Yes, if that part number is valid and set up right, it should generate a lot from that pool.

I have not verified if it is not saved, whether it will give back the same lot, or the next in sequence.

1 Like

Verified.

It will give the next in sequence, whether or not you save it.

jbooker

1 Like