Technical Document
EnglishAssigning Sequential Numbers
USING SERIALIZATION TO ASSIGN UNIQUE
IDENTIFIERS TO ITEMSSUPPORTS: BARTENDER ® 2016 AND LATER VERSIONSContentsOverview
Using Serialization in BarTender
Configuring Serialization
Increment/Decrement
MethodPreserve the number of characters
Increment by/Decrement byPrint Quantity
Determining the Serialization Frequency
When Data Changes
ExampleDefining a Custom Serialization Sequence
ExampleAdvanced Formatting Options
Using character templates
Using data types
Using Multiple Data Sources
Resetting a Serialized Sequence
Sharing Serialized Data Sources Between Documents
ExampleRelated Documentation

344455556667777789101011Overview
Many industries, including the pharmaceutical, food and medical device industries, require you to beable to track their products after they leave the factory or packaging plant. These industries need anaccurate and easy way to track and locate their products in the event of a recall or required
customer alert, or for expiration management and prevention of counterfeit products. Many
regulated industries are required by governmental and other regulatory agencies to closely tracktheir supply chain. For example, the US Drug Supply Chain Security Act (DSCSA) and the EU False
Medicines Directive (FMD) came into full effect in 2017. Each regulation describes a specificserialization scheme that manufacturers must use to track all their products.
Serialization refers to the act of assigning a unique identification code to each item in a series.
Although each identifier is typically called a "serial number," it can include letters, numbers orsymbols.
In BarTender, you can enable and configure serialization for a data source in a template object byusing the Serialization dialog. After you configure a data source to use serialization, the serialized
value automatically increments or decrements with every printed item. You can configure yourserialization number to reset itself after an event, such as the end of a print job or a change to a
database, or after a specified number of characters is reached.
In its simplest form, you can use serialization to assign individual serial numbers to printed items.
You can also use serialization together with other data sources on the template or in the sameobject to create a full picture of the item's origins and movement through the supply chain.

Assigning Sequential Numbers

3

Using Serialization in BarTender
To add serialization to a text, barcode or encoder object, you must enable the Serializationtransform. You can enable the Serialization transform and manage BarTender's advanced
serialization settings by using the Serialization dialog.

This technical document briefly describes some of the options on this dialog. To view the full set ofserialization features and examples, refer to the Serialization Dialog topic in the BarTender helpsystem.

Configuring Serialization
Serialization in BarTender is flexible and easy to configure. You can set serialization to simply countprinted items, or you can create complex serialization sequences that are based on print or dataevents.
The following options are available in the Serialization dialog.

Increment/Decrement
You can set your serialization sequence to increment (count up) or decrement (count down).
In the Serialization dialog, you can specify how and when to increment or decrement thesequence. This can be as simple as incrementing one number each time an item is printed, butmany more options are available. For more information about events that can determine whenserialization occurs, refer to the Determining the Serialization Frequency chapter of this technicaldocument.

Assigning Sequential Numbers

4Method
The method of serialization refers to the type of characters that are used in your serialization
sequence. You can choose a predefined sequence or create your own, as follows:
lll

l

l

l

Alphabetic and/or Numeric: Specifies that at print time, BarTender detects whether theinitial characters in the data source to be serialized are numeric, alphabetic, or somecombination of the two, and maintains compatibility with that character set. That is, if thecharacters that are to be serialized start as numeric, the serialized data will continue to benumeric, and if the characters that are to be serialized start as alphabetic, the serialized
data will continue to be alphabetic.
Numeric: Specifies that the set of characters that are used in the serialization sequence isthe ten digits 0 through 9.
Alphabetic: Specifies that the set of characters that are used in the serialization
sequence is alphabetic only. There are further options within the Alphabetic method ofserialization, such as uppercase, lowercase, and the option to leave out the "I" and"O" characters to avoid confusion with the numbers "1" and "0".
Alphanumeric: Specifies that the set of characters that are used in the serialization
sequence includes the ten digits 0 through 9 and the 26 letters A through Z (in that order).
This method includes the same options that are available in the Alphabetic method.
Hexidecimal: Specifies that the set of characters that are used in the serialization
sequence includes the ten digits, 0 through 9, and the letters A through F.
Custom Sequence: Specifies that the set of characters that are used in the serialization
sequence is a specific sequence of your choosing. For more information, refer to theDefining a Custom Serialization Sequence chapter of this technical document.

Preserve the number of characters
By using this option, you can preserve the number of characters in a serial number, so that thenumber of characters does not change when the number increments or decrements. This isadvantageous when you have limited space in which to print the serial number.

Increment by/Decrement by
You can configure serialization to increment
or decrement on each printed item by a valuethat you specify. Alternatively, you can obtain
the increment/decrement value from adatabase field or named data source.

Print Quantity
You can control how many serial numbers areprinted and how many copies are printed per
serial number. You can configure thesesettings in either the Serialization dialog or
the Print dialog.

Assigning Sequential Numbers

5Determining the Serialization Frequency
You can specify how often serialization will occur by defining an "event" that tells BarTender at whattime and/or under what circumstances you want to serialize the data source. Your data source canchange its value in any of the following circumstances:l

When a new item is printedl

When BarTender reads a new database recordl

When a new page of items is printedl

When you run a new print job

When Data Changes
BarTender supports the "When Data Changes" event. This means that BarTender will change thenumber in the serialization sequence each time a value changes in a connected database field,
named data source or template object.

ExampleSuppose you have a shipping company that has three products. Instead of serializing eachindividual item, you want to serialize per type of item.
BarTender is connected to a database that includes the field "Product." The value of the"Product" field can be either Product A, Product B, or Product C.
Product A is assigned the serial number 10001. That same number is assigned to every printed
item, whether you are printing five items or five thousand, until the value of the "Product" fieldchanges from Product A to Product B. Product B is then assigned the serial number 10002, andsubsequent printed items are assigned that same number. When the value of the "Product" fieldchanges to Product C, Product C is assigned the serial number 10003, and so on.

Assigning Sequential Numbers

6

Defining a Custom Serialization Sequence
If none of the predefined serialization
sequences meet your requirements, youcan use BarTender to define your own
custom serialization sequence. For asmall print job, you might choose a
simple sequence, such as "01234567"
or "DEFGHIJ". For a larger, more
complicated project, you might want tocreate a more advanced sequence that
contains numbers, letters and/orspecial characters.

When you create a custom sequence, you must not use the samecharacter twice in a single set of characters. If you repeat a characterin the sequence, BarTender will automatically display error message
6620. For example, if you type in a five-character sequence of
24682, the error is displayed, and you must delete the repeatedcharacter to continue.

ExampleSuppose that you want your serialization to increment (or decrement) by specific numbers,letters, or characters, rather than by a simple consistent interval. In the Sequence field, youenter the sequence 1862730. Then, when you set the sequence to increment by 1, yourserialization sequence would be 1, 8, 6, 2, 7, 3, 0, 11, 18, 16, 12, 17, and so on.

Advanced Formatting Options
You can use advanced formatting options to add special characters or numeric selection to yourserialization sequence.

Using character templates
You can add extra spaces, dashes, parentheses and other special characters to yourserialization sequence using the Character Template dialog, which is located on the Transforms
tab of the serialized object’s Data Sources property page. These characters are not part of theactual serialization sequence; they do not increment or decrement. Rather, they are used toformat the data in the serialization sequence into a particular arrangement.
For more information, refer to the Character Template Dialog topic in the BarTender help system.

Using data types
You can combine serialization with a numeric selection on the Data Type tab of an object's DataSources property page to include commas or set the number of decimal places. For more
information, refer to the Data Sources Property Page topic in the BarTender help system.

Assigning Sequential Numbers

7

Using Multiple Data Sources
In some instances, you might require a complex serial number that contains two or more sections
that draw from different data sources. For example, you might have a sequence like the following:2021-07-25-0001
2021-07-25-0002
2021-07-25-0003
The first part of the number, 2021-07-25, is a date, and it is attached to a Date data source type.
The last four digits (0001, 0002, and so on) are the serialized number, which changes with every
new item. You can configure this serialization by using separate data sources within the object. For
more information, refer to the Working with Data Sources topic in the BarTender help system.

Assigning Sequential Numbers

8Resetting a Serialized Sequence
In many cases, you won't want to continue your serialized sequence forever. You can use the options
on the Reset tab of the Serialization dialog to define the circumstances under which the sequence
starts over, as follows:lWhen a value is reachedlWhen you run a new print joblWhen BarTender reads a new database recordlWhen the value of a data source changeslOn a defined schedule

When you define your reset options, you can also set the value that the serialization sequence
resets to. At any time, you can click Reset Now on the Serialization dialog to immediately reset theserialization sequence.

Assigning Sequential Numbers

9Sharing Serialized Data Sources Between Documents
You can share a serialized data source between multiple
documents by creating and serializing a global data field. Global
data fields are data sources that are available for use by all
BarTender documents that are connected to the same BarTender
System Database. You can organize them into folders on theBarTender Data Sources pane so that they can more easily becategorized.
After you create a global data field, you can open its Data Sources
property page and configure serialization for it on the Transformstab, just as you would for a data source.
For more information, refer to the Using Global Data Fields topic in
the BarTender help system.

Global data fields are stored in the BarTender System Database. If
you have not yet set up the BarTender System Database, you cannot
create or access global data fields.

ExampleSuppose that you have three instances of BarTender running that you are using to print threedifferent BarTender documents. Although the documents are formatted for three different items(for example, labels for dog food, cat food and ferret food), their serial numbers share a common
section, which indicates the shipment number. This section is on the left.

The section of serial number on the right is specific to the type of pet food. The data source forthe section on the right is located in the individual BarTender document. However, you draw thedata for the shared section on the left from a global data source. To do this, you need to connect
an object on each of the three BarTender documents to the same "shipment number" global
data field.

Assigning Sequential Numbers

10Related Documentation
Technical DocumentslCreating Intelligent TemplateslCreating Headers and Footers

To view and download technical documents, visit:https://www.seagullscientific.com/resources/white-papers/

User GuideslGetting Started with BarTender
https://support.seagullscientific.com/hc/categories/200267887

BarTender Help Systeml

Serialization DialoglWorking with Data Sourcesl

Using Global Data Fields

lCharacter Template

Other Resources
Please visit the BarTender website at https://www.seagullscientific.com.

© 2020 Seagull Scientific, Inc. BarTender, Intelligent Templates, Drivers by Seagull, the BarTenderlogo, and the Drivers by Seagull logo are trademarks or registered trademarks of Seagull Scientific,Inc. All other trademarks are the property of their respective owners.

Version 2020-11-08 Copyright © 2020 Seagull Scientific, Inc.