Your tracking application needs to have a barcode that combines multiple data fields, and two dimensional (2D) barcodes such as DataMatrix and QR Code are ideal for building compact barcodes containing lots of information. LabeLase® Producer itself allows you to easily combine more than one text field from your layout into one of these 2D codes, but when you scan the codes later in the tracking process how does your software know where one data field ends and the next one begins?

If the data fields that went into the barcode contain text strings that are always the exact same length from tag to tag, then your scanning software can easily parse the data and extract the fields based on their individual string lengths. While this is an easy solution, it is rarely an option because it is unlikely that your data will always be in such a fixed and unchanging format. In the more common scenarios, you need to add some kind of field separator character, also called a delimiter, between each of the fields in the barcode.

Before I describe the method used to add field delimiters to barcodes in LabeLase® Producer, I want to recap how we normally build barcode fields using links to existing text fields.

In Producer, each text field you add to your layout gets assigned a Link ID. This identifier is a number that should be unique to the specific text field in the layout. Producer automatically assigns the next available number when you add the text field, but you can change it to any number you want. When you create the barcode field that will contain the same data as the text field, simply enter the text field’s ID number in the barcode’s Link field. That’s all you need to do to establish the link between the barcode and the text fields.

Linking the barcode to multiple text fields is just as easy.  Instead of entering a single number for one text field ID, enter a list of text field ID numbers, each separated by a comma character. Producer will reference each text field in the order specified and combine them into a single text. The resulting text becomes the contents of the barcode.

Using this comma separated list of text IDs is an easy way to link multiple fields, but it simply shoves each text string up against the next, without any indication of where the fields begin and where they end. If you want to add a field separator between each field, then the list of link IDs is not going to work.

To solve this problem, Producer has another way to specify the barcode field’s content. In the same Link field that you previously used to enter your comma separated list of text field IDs, you must instead enter the exact text that you want to encode. For Producer to know the difference between the “list of link IDs” and the “this is the exact text to encode”, we begin the link with a colon character “:”.  This is a flag to Producer that says “everything that follows this colon character (but not including the colon) is to be encoded directly into the barcode. Of course, Producer also parses this text to look for special % flags and functions like it does with all text strings. This feature allows us to build arbitrarily complex text strings to be encoded in the barcode, while making it easy for downstream automation to scan and decode the data.

Here is an example of how this might be designed. You have a layout with three text fields, with each field getting its data from the Operator Data Entry table:

Item Number 23
Part Number ITM42030
Description SWITCH,PRESSURE,N.O.,SPST,4PSI

You would add your three text fields to the layout specifying:

Text Field 1:    %1V
Text Field 2:    %2V
Text Field 3:    %3V

Now when you add your DataMatrix barcode to the layout, you don’t want to use the old style “list of link IDs” since you want to add field separators.  In the link field you begin with the colon character and then specify the exact data to encode:

:%1V-%2V-%3V

Notice that I used a hyphen character as my field separator.  You will need to use a character that will be recognized by your downstream scanning application. In this example, something simple like a comma character is not allowed since the Description field itself contains commas and that would confuse the scanner. Pick a field separator that won’t appear in the data but is compatible with your system.

Producer allows you to use any character as your separator, even unprintable “Control Codes”. To specify these codes you use a special escape sequence that begins with a back-slash character:

Specify the hexadecimal value directly using the following format: \x09

Use a common "escape" sequence: \r = carriage return, \n = line feed, \t = tab

Use the standard ASCII control code name: \<TAB> \<CR> \<RS>

Our previous example, using the ASCII Tab character instead of a hyphen, would look like this:

:%1V\t%2V\t%3

Notice that I used a \t escape sequence to assign the TAB character as the field separator.

Combining lots of data in a 2D barcode can be very useful in your tracking application. LabeLase® Producer provides a very flexible way to combine multiple data fields along with special separator characters in a single barcode.

Special thanks to Kacey Graves for her help with this post.

LabeLase is a Registered Trademark of InfoSight Corporation