Jump to content

with OneCode Barcode Rule


Recommended Posts

Hi,

 

I'm trying to implement the intelligent barcode on our mailing job but I cant make that work.

 

I understand that FusionPro has the OneCode Barcode Rule for the creation of the Intelligent Barcode, but there are only 2 fields to filled up instead, the Intelligent Barcode has 5 items to be filled up.

 

Is there any rule that I could add to the JavaScript text?

 

I would really appreciatte any information that you guys can provide. I'm so confused right now....:confused::(

Link to comment
Share on other sites

Please refer to this thread for more information about using the Intelligent Mail Barcode in FusionPro, specifically this post.

 

 

Basically, the two parameters to the MakeOneCodeBarcode(aka MakeIntelligentMailBarcode) function, and the corresponding template rules, are the tracking number and routing number, per IDAutomation's implementation. The tracking number is made up of four separate components:

  1. Barcode Identifier
  2. Special Services ID (aka Mailer ID)
  3. Customer Identifier (aka Service Type ID)
  4. Sequence Number (aka Serial Number)

And the routing number is simply the ZIP code plus (optional) delivery point. So those are your five "items."

 

If you have five separate fields in your data, you'll need to simply concatenate the first four into the tracking number (string) in a JavaScript rule, something like this:

var trackingStr = Field("BarcodeID") + Field("MailerID") + Field("CustomerID") + Field("SerialNum");
return MakeOneCodeBarcode(trackingStr, Field("RoutingCode"), 12);

Note that you don't need to set the font in the Text Editor as the function inserts the necessary tags. You do need to remember to check the "Treat returned strings as tagged text" box, however.

Link to comment
Share on other sites

I do have five separate fields in my data, so I tried to concatenate the first four into the tracking number (string) in the JavaScript rule.

 

I made a new empty rule and added the this code:

 

Code:

---------

var trackingStr = Field("BarcodeID") + Field("MailerID") + Field("CustomerID") + Field("SerialNum");

return MakeOneCodeBarcode(trackingStr, Field("RoutingCode"), 12);

---------

 

I replaced each field with the names that i have in my data. But once I hit "validate" I get this error:

 

C:/Program Files/Printable/FusionPro/Builtins.js, line 2239: Error: Routing String bad length

 

 

Any solution?

Link to comment
Share on other sites

I replaced each field with the names that i have in my data. But once I hit "validate" I get this error:

 

C:/Program Files/Printable/FusionPro/Builtins.js, line 2239: Error: Routing String bad length

The routing string has to have a length of either 0, 5, 9, or 11 digits. (Where 5 digits is an old-style ZIP code, 9 is the new ZIP+4, and 11 includes the delivery point. Basically, it's what was in the old-style POSTNET barcode.)

 

For more info:

http://www.idautomation.com/intelligent-mail.html#Generating_Formatting

 

So the question is, how long is the data in the Routing Code field? Try doing this and see what it returns (you can just click "Validate" again):

return Field("RoutingCode").length;

Replace the field name with the field name from your data, of course.

 

You could also let me know exactly what data is in that field, and I might be able to figure out what to add or trim to make it fit one of the accepted lengths.

return Field("RoutingCode");

Link to comment
Share on other sites

OK Dan,

 

This is basically what I have. I use a PDF file on Acrobat with a txt (tab delimited). I do have the oniginal data base as an excel file and then I save it as a TXT file. This is a sample of how the data is composed on the excel file (the first row is the name of the fields)

 

COMPANY Address City State Zip-code Lastname Name 21 Century Oncology 136 S Broadway Yonkers NY 10701-4008 Rubenstein Paul 21st Century Oncology 970 N Broadway # 101 Yonkers NY 10701-1310 Rubenstein Paul

Any suggestion?

Link to comment
Share on other sites

Here is a better sample

 

COMPANY / Address /City / State / Zip-code / Lastname /Name 21 Century Oncology /136 S Broadway / Yonkers / NY /10701-4008 / Rubenstein /Paul

21st Century Oncology 9 /70 N Broadway # 101 / Yonkers / NY/10701-131/Rubenstein /Paul

Well, it would be easier to understand how that data is being used in the barcode if you posted the syntax of your rule as well. I'm going to assume here that you're simply passing the "Zip-code" field as the routing string (the second parameter) to the MakeOneCodeBarcode function, something like this:

return MakeOneCodeBarcode(trackingStr, Field("Zip-code"), 12);

The length of the data in that field, from the sample data you posted, is ten characters: "10701-4008". That's not an acceptable length. The problem is the hyphen; that needs to be stripped out, then the length will be nine characters, which is the proper format for a ZIP+4 routing string as far as the Intelligent Mail Barcode standard is concerned. So, you'll want to do this instead:

return MakeOneCodeBarcode(trackingStr, ReplaceSubstring(Field("Zip-code"), "-", ""), 12);

If you want to post a picture, you can't just put IMG tags around a path on your local machine; you'll need to link to a picture on the Internet instead (with a URL starting with [noparse]"http://"[/noparse]). You can upload the picture into an album hosted on the forum by going here:

http://forums.printable.com/album.php?do=addalbum

 

Don't be afraid to click the "Go Advanced" button and then "Preview Post", or to edit your post after posting.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...