Jump to content

Intelligent Mail Barcode Error


tlcoke

Recommended Posts

I am getting an error when manually creating my string for the Intelligent Mail Barcode.

 

Here is my code:

var trackingStr = Field("appid") + Field("serviceid") + Field("mailerid") + Field("seqnumber");

var RoutingCode = Field("zip") + Field("zip4") + Field("dpbc");

 

return MakeOneCodeBarcode(trackingStr, RoutingCode, 12);

 

I am getting an error message: C:/Program Files/Printable/FusionPro/Builtins.js, line 2258: Error: Routing String bad length

 

I tested the length of my Routing Code line and it = 12

ZIP = 5

Zip4=4

DPBC = 3

 

How do I correct for the 11 digit length built into the MakeOneBarcode rule

Link to comment
Share on other sites

Hello Tracy,

 

The delivery point should be 2 digits. Your's is 3 digits which makes me think that your pre-sort package that created this applied the checksum digit to the 2 digits which is not needed for the MakeOneCodeBarcode() function. BTW - the function "MakeOneCodeBarcode()" is now called "MakeIntelligentMailBarcode()" in FusionPro v6 for anyone interested in that point.

 

To resolve this, try modifying your JS to take only the first 2 digits of the dpbc field (assuming the checkdigit is the 3rd digit). Now I'm just guessing that this is the issue here so please print a proof of this and scan it to ensure the Intelligent Mail Barcode is correct.

 

Here's a modified version of your script that will take in just the first 2 digits of that field:

 

var trackingStr = Field("appid") + Field("serviceid") + Field("mailerid") + Field("seqnumber");
var RoutingCode = Field("zip") + Field("zip4") + Left(Field("dpbc"), 2);

return MakeOneCodeBarcode(trackingStr, RoutingCode, 12);

hth

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...