I’m trying to set up an auto print Bartender label that happens after someone uses the Move WIP functionality.
I have no problem making a label coming out, but the conditions are stumping me.
I’m doing an in-transaction directive on the PartWip table, but it seems that there are two transactions that happen almost simultaneously and are different based on whether you’re moving the entire amount or just a partial.
If you move the entire amount, there are two updates that happen (one for the old and one for the new).
If you move a partial, there’s an update and an add. (I don’t remember if those were exactly correct, but it’s something like that). If I use the “At least one Updated row”, then I could get a label for each condition (move all or move partial), but the move partial generated a duplicate label. I couldn’t figure out how to put in a condition to get rid of that second label.
Then I went over to method directives to see if that would work.
I did a trace and got this
It looks like it uses the same BO as issuing and returning material. I definitely do not want a label to come out during those transactions and I could not find a way to differentiate the Move WIP traffic from the Issue/Return traffic.
So then I thought that I could put a UD or callContext checkbox on the Move WIP screen to be checked if they want a label. Works great! Except I’m pulling data from the PartWip table and the gentleman who wrote the customization to be able to use the Move WIP function on the handheld doesn’t have access to the PartWIP or callContext tables externally. The custom UI only has the IR table available.
Anyone have any ideas on how I can auto print a label without duplication after a Move WIP transaction is done, but not during issue/return or anything else?
I use the PartTran table to trigger label prints via BarTender. Use C# to write out a text file that Bartender Integration picks up and actions. Not familiar with the Move WIP function, but it’s possible that it writes to PartTran with STK-STK trantype?
Because it’s C# you be as fancy as you like with the conditions required to fire the code, and also with things like dynamically selecting printer based on user/location etc.
I just checked PartTran after doing a Move WIP and it does not create a transaction record there.
The data with which I need is coming from the PartWip table.
And I have no issues writing the code to do things.
My issue is coming up with the conditions to isolate exactly what I need.
Move WIP vs a transaction done in MES.
Move WIP vs an Issue/Return.
Move WIP all vs Move WIP partial.
These are all different conditions I need to isolate, but originating module isn’t a field I can key off of. These records all look the same coming from a table standpoint.
It looks like Move WIP uses the IR temp table to update the PartWip table.
Is there any way I can get that IR table to update a UD field on the PartWip table?
Maybe this is ghetto, but create a UD field on the PartWip table and in each UI, set a call context with which screen the user is in. Then, when the transaction is performed, inject whatever is in the call context into the UD field?