Skip to main content

Search

Search

Maintaining Multiple Data Specific Counters

Comments

4 comments

  • Avatar
    Fernando Ramos Miracle

    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 123
            Value = Format.NamedSubStrings("123").Value
     
        Case 456
            Value = Format.NamedSubStrings("456").Value
     
    ...
     
    End Select 

     

    On 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 123
            Format.NamedSubStrings("123").Value = Value 
     
        Case 456
            Format.NamedSubStrings("456").Value = Value
     
    ...
     
    End Select
     
    Hope this helps.
     
    Regards.
    0
  • Avatar
    Legacy Poster

    The scripting solution was exactly what I was looking for.  Thanks for your help!

    0
  • Avatar
    Legacy Poster

    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
  • Avatar
    Canguita

    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.