Generating a series of labels with unique randomised data fields
Hello,
I am very new to Bartender so please excuse any naivety or unknowns about potentially obvious features. We have a new requirement for a simple barcode that contains a data field with a random number that is unique from all previous barcodes and am keen for advise on best practices to achieve this.
Scenario: When a label is generated/printed from bartender print station it is to contain a random 5 digit number, not serialised. The fun part is it needs to be unique from every label printed previously.
I figure there are a couple ways of doing this:
Option (1): connect to a database and store the number, cross referencing to ensure it is not a duplicate. I am not sure how I would make this connection though through bartender so some advise would be greatly appreciated?
Option (2): print all barcodes at once by; generating an array via shuffle, for every barcode printed take a number from the array. In this option, how do I store the variable and call on it for every label printed?
Not looking for someone to generate the solution for me/write the scripts, just point me in the right direction on how to achieve it. Please let me know if further clarification is needed.
Cheers!
-
Peter Thane
★ BarTender Hero ★
Although there is a randomiser function within VB there is no way to guarantee that the number has not been used before. It may therefore be better to create the numbers outside of BarTender and say log them into a simple database in their random order. At print time you would then need to select the next block of records/number to print .
0
Please sign in to leave a comment.
Comments
1 comment