Maintaining Multiple Data Specific Counters
I've been assigned a project that seems feasible on the surface but I can't seem to wrap my head around how you'd accomplish so I thought that maybe the big brains in the Seagull forums might be able to help with. I've got a database that looks like something like this:
Item # Line Qty Total Qty Bin
123 10 15 AA
456 10 10 BB
789 5 10 CC
123 5 15 DD
789 5 10 EE
The database output (and therefore print order) is sorted by Bin for more efficient
picking.
Now here lies the challenge: Each of the item numbers need a
counter. Item 123 needs a 1 of 15, 2 of 15, etc. type of counter and so
does item 789. In the past we could do a counter without any vbscript at
all, but all of the item quantities were consolidated then. Now that
we've got multiple lines of a single item number I'm not sure how to make the
second occurrence of item 123 continue the counter to 11 of 15, 12 of 15, etc.
Any thoughts on how I might accomplish this?
-
Hello paconcorp,
What you would need to do is to "store" the last serial number for each different item, this way you can source the last used serial for each item, serialize it and store back the last used one.
I can think of several ways of doing so, although in all cases the actual object displaying the serial number would use a VB script that sources the correct serial number depending on the new records item:
1. If you don't have too many different items, you could create a different named data source for each. this would store these serial numbers in the actual BarTender document.
2. A second option would be to use different "Global Data Fields" this way you could share these different serial number between different documents.
3. A third option would be to store those different serial numbers in an external data source through the actual VB script (although this is a more advanced VB Script).
In any case, the script displaying the actual data would be as follows:
In the "OnNewRecord" event:
Select Case Fiedl("Item #")Case 123Value = Format.NamedSubStrings("123").ValueCase 456Value = Format.NamedSubStrings("456").Value...End SelectOn the "OnSerialize" event:
Value = Value + 1
Finally you would need to load the serial number back to the variable named data source, but in this case you would probably need to apply the code in the "OnIndeticalCopies" event. Of this I'm not fully sure, please make sure to test it. In any case it would be as follows:
Select Case Fiedl("Item #")Case 123Format.NamedSubStrings("123").Value = ValueCase 456Format.NamedSubStrings("456").Value = Value...End SelectHope this helps.Regards.0 -
The scripting solution was exactly what I was looking for. Thanks for your help!
0 -
hi I'm very new to this and in need of simple advice, not sure if this is the correct place to ask, but I'm gonna go ahead anyways..
Are there any way how I can see the quantity of prints I make... like a counter of some sorts or print log, I'm using Argox Special Edition BarTender UltraLite.
This would be of great help thanks.
0 -
You can use serialization. For it in your Text Objec Properties click on "Transforms" tab and click on "Serialization" button.
Insert as embedded data the initial number and in the serialization you will find the options to increase on each printed label.
0
Please sign in to leave a comment.
Comments
4 comments