Error By Double Serial Number
Each product that we produce must be linked to an unique serial number.
Sometimes it happens that we use a double serial number for a product.
Is it possible that Bartender gives an error when we would print a label with a serial number that we already used?
If so, how could I set up this in Bartender (Version 9.4) ?
Kind regards,
Koen Maessen
Wicro Plastics
-
Hello Koen,
I'll need some more information in order to be able to answer you accurately:
1. What do you exactly mean with a "double serial number"? Is it that you use the serial number in two different documents? Or that the serial number is composed of two smaller serial numbers?
2. How are you treating this serial number that it can be duplicated? Do you enter the first value by hand and the serialize it? Or maybe you wish a serial number to be updated on several documents at the same time (like a global serial number)?
Note that in order to avoid duplicating serial numbers you can basically do two things:
a. Implement it in such way that is not possible to duplicate it.
b. Store all used serial numbers in a database and before printing a new one query this database to make sure that it wasn't printed.
*This second solution usually doesn't have much sense with serial numbers (if the progress of the serial number is properly implemented there is no way that it could be repeated) , but would be better understood for random numbers.
Regards.
0 -
Hello Feranando,
Thanks for your answer!
We enter the first serial number by hand and print a batch of labels.
The software serialize the serial number for the other labels, excluding the first serial number which we enter manually.
We could implement the process that it isn't possible to duplicate serial numbers, but is accompanied with high costs (we should to invest in 4 labelprinters, 2 computers and installation costs)
Option B may be interesting for us to ensure we print a serial number that isn't use before.
When you store all used serial numbers in a database and you will print a serial number that is used before, gives Bartender than an error?
Can you explain me how I could store all used serial numbers to a database? (Bartender version 9.4)
Have you got a manual / internet link where I can find how to implement this in Bartender?
Thanks in advance!
With kind regards,
Koen Maessen
Wicro Plastics
0 -
Hello,
1. Actually option #a should be much more efficient and easy way to work with as you would use the serialization option withing BarTender. You would only need to avoid users from interacting with the serial number. This way you would specify the number of serialized labels you wish, and BarTender would take care of the rest, saving the last used value in the document. When you then started printing again, BarTender would start from from the lasts used serial number.
*You could use Print Station for example, which will forcibly save the label after printing and will prevent the user to modify any part of the label except those variable fields set in the Data Entry Control.
2. If you wish to share that serial number between different documents and make sure it doesn't get duplicated I would recommend upgrading to BarTender v10.1 as we add a feature called "Global Data Fields". This fields can be shared through different documents and it's used assures that their value will definitively get updated correctly.
The main purpose of this new data field (although not the only one) is to allow the use of a serial number through various documents and assure it's unique character in all cases. You could even add security measures over these fields so users won't be able to manually modify it even if they have access to other editing features.
3. Working with v9.4 you could still imitate this functionality, although without the same security as the above option carries. For your reference, in the below forum post I attached two documents that share a serial number through a text file:
4. If you still wish to build a database and have BarTender check it for repeated values every time it prints, you'll need to use a VB script that carries out that action. Something similar to the below code:
'Read each line of the text file and compare with the newly generated number.If fs.FileExists("c:\logfile.txt") = True thenSet myFile = fs.OpenTextFile("c:\logfile.txt", ForReading)Do Until myFile.AtEndOfStreamvarTextLine = myFile.readlineIf varTextLine = varSerNum ThenvarCompFlag = 1Exit DoElsevarCompFlag = 0End IfLoopfile.close'If no matches are found we can print the label and append to the text file.If varCompFlag = 0 ThenAppendNumbers(varRndNum)value = varRndNumvarCompFlag = 2End IfEnd IfThe code veifies if a text file called "logfile.txt" exisits (this will be the file where the numbers will be stored in this example), it will then enter in a loop where it reads a line of the file (each with a serial number in it) and compares it with your entered value. If the value is not in the file, it will write it at the end of it.You would need to load the information from your entered serial value to the "varSerNum" variable, declare all the variables, and add a message (MsgBix()) and cancel (Format.Cancel) commands when the code finds a repeated value in the file.*This code should be entered in the VB events you wish to work with.Regards.0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare