Jump to content
Welcome to the new FusionPro User Forum! ×

Code 128


dreimer

Recommended Posts

I have 19 digit codes supplied to me from my customer and they say the 19th digit is the checksum using MOD10. If I use the Create Code128 Barcode rule in FusionPro, does the program try to create a checksum itself or does it just encode the data for using the IDAutomation Code 128 font?
Link to comment
Share on other sites

I have 19 digit codes supplied to me from my customer and they say the 19th digit is the checksum using MOD10. If I use the Create Code128 Barcode rule in FusionPro, does the program try to create a checksum itself or does it just encode the data for using the IDAutomation Code 128 font?

The Make128Barcode function encodes and appends the checksum character. If you already have a checksum digit, you can just remove it and then call the function, like so:

return '<f name="IDAutomationC128M">' + NormalizeEntities(Make128Barcode(Field("BarcodeData").slice(0,-1)));

Link to comment
Share on other sites

Great so I will just trim the last character in my data program before I apply the rule, that will work without changing the built in rule correct?

Yes, you can either trim the checksum character in your data file before composing, in which case you can use the XML Template rule, or you can use a JavaScript rule to trim that character, as shown above.

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...