Jump to content

Numeric IMP


spalmerchuck

Recommended Posts

If the barcode is already encoded into a string of 0, 1, 2, and 3 digits, then you can simply insert the field into the Text Editor and put it in the IDAutomation4State font. You don't need any rule. If it's in another format, you can go into the New Rule dialog, on the Barcode tab, and select the Intelligent Mail Barcode Rule.
Link to comment
Share on other sites

When I use the following IMB rule (see attachment) I get an error message of

 

C:\Program Files (x86)\PTI\FusionPro\Builtins.js, line 2721: warning: The tracking number is not the correct length of 20 characters in record number 1.

Composing record #1, input record 1

 

My barcode field contains the following "00240206150129480945065151780".

Capture.JPG.073af15ba3e53aa34bf7458cfda12427.JPG

Link to comment
Share on other sites

Thanks Dan that worked. But I am still missing something. When I just put the numeric barcode numbers in a text box and apply the font it does not show up correctly. The sample attached shows the barcode when applying the IDAutomation font. I also tried a few other fonts but they all require the barcode field to be the Alpha Letter.

TEST-Output.pdf

Link to comment
Share on other sites

Thanks Dan that worked.

Great!

But I am still missing something. When I just put the numeric barcode numbers in a text box and apply the font it does not show up correctly. The sample attached shows the barcode when applying the IDAutomation font. I also tried a few other fonts but they all require the barcode field to be the Alpha Letter.

What Don said earlier was not completely correct.

 

If the data has already been encoded to a string of 0, 1, 2, and 3, then yes, you can simply apply the IDAutomation4State font to it. Similarly, if you have a string of F, A, T, and D characters, you can apply a font such as USPSIMBStandard to it. Nothing else needs to be done.

 

However, if what you have is the "raw" barcode data (tracking and routing codes), which contains any digits 0-9, then you first need to run it through an encoding algorithm to get the string of 0, 1, 2, and 3.

 

FusionPro's built-in MakeIntelligentMailBarcodeEx function performs both steps: It takes the raw data and encodes it as a string of 0, 1, 2, and 3, and then applies the IDAutomation4State to it, with some extra formatting to control the size of the barcode. (It can also detect if you have data that's already formatted as either 0, 1, 2, and 3 or F, A, T, and D, and handle that appropriately.)

 

Some background: What is now called the Intelligent Mail Barcode used to be called the 4-State Barcode. It wasn't called 4-State because it applied to only four states in the U.S. (which was confusing, and probably why they changed the name), but because the barcode itself consists of four distinct symbols, or vertical bar types. called Full, Tracker, Ascender and Descender (F, T, A, and D).

 

Different barcode vendors and generators came up with different ways of creating these barcodes from these four symbols. Many font vendors decided to encode the characters F, T, A, and D, to match the names of the symbols. Other vendors decided to have their fonts encode four different characters; in the case of IDAutomation, they decided to encode the numbers (digits) 0, 1, 2, and 3.

 

So the bottom line is that the IDAutomation4State does not handle any arbitrary string of digits (numbers); it handles data encoded specifically as a string of 0, 1, 2, and 3 digits.

Link to comment
Share on other sites

Thank You for the additional information. I will look into the function. I wish there was a way to just place the full numeric barcode values in a text box or a rule and apply the font without having to parse the barcode into different fields.

Well, that's the idea of that "Intelligent Mail Barcode Rule" Form (XML Template) rule. It handles both the "raw" barcode data and already encoded strings of 0123 and FTAD. But it does assume that, if you have the raw data, that it's the full 31 characters, consisting of a 20-digit tracking code and a full 11-digit routing code, where that 11 digit routing code is 9 digits of "Zip+4", plus a two-digit delivery point:

https://en.wikipedia.org/wiki/Intelligent_Mail_barcode#Delivery_point_ZIP_code

That delivery point is usually added by a postal sorting program, so that the mailing can take advantage of discounted pre-sorted rates.

 

Your raw barcode data has strings of 29 digits, which are the 20-digit tracking code plus only 9 digits for the routing, and are missing the delivery point information. A valid Intelligent Mail Barcode can still be created without the delivery point (and even without any Zip code or routing code at all), but we didn't account for that particular variation when we make our rule because we assumed that such barcodes would generally be used in a pre-sorted workflow.

 

So, perhaps we should enhance the Form rule, and the MakeIntelligentMailBarcodeEx function, to accept routing codes of 0, 5, or 9 digits, as well as the full 11 digits, which would make your data more "plug and play," but for now, if your routing code isn't the full 11 digits, you'll need just those couple of lines of JavaScript.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...