Hello,
I have a custom script in then scan station where the user click to send the batch.
I would like to get the name of the current batch (the one the user clicked) but i can not.
I find the property "ActiveBatch" but It does not work : me.ActiveBatch.Name?
here's what I've done yet :
nb_tot = me.Batches.count -1
nom_lot = me.Batches.item(nb_tot).Name
The variable "nom_lot" contains the name of last batch scanned but this is not necessarily the batch on which the user clicked
Another question : in my script, I stop the exportation of the batch if a condition is not true :
this is my code : me.Batches.item(nb_tot).IsExported = false
this code is OK but I would like to put a message for the user to warn that the export failed. How can i do it?
Thanks for your answers
Baltus
I have a custom script in then scan station where the user click to send the batch.
I would like to get the name of the current batch (the one the user clicked) but i can not.
I find the property "ActiveBatch" but It does not work : me.ActiveBatch.Name?
here's what I've done yet :
nb_tot = me.Batches.count -1
nom_lot = me.Batches.item(nb_tot).Name
The variable "nom_lot" contains the name of last batch scanned but this is not necessarily the batch on which the user clicked
Another question : in my script, I stop the exportation of the batch if a condition is not true :
this is my code : me.Batches.item(nb_tot).IsExported = false
this code is OK but I would like to put a message for the user to warn that the export failed. How can i do it?
Thanks for your answers
Baltus
Comments
1 comment
current_batch = me.ScriptItems.Item(0).Name
And also to stop the exportation :
me.ScriptItems.item(0).IsExported = false
Post is closed for comments.