Jump to content

Ean13 barcode one number to many in file


Recommended Posts

I am new to fusion pro and variable data in the whole. Like the software so far and seen a lot of the online movies about the use of it. I encountered a problem i can not solve yet with my little knowledge so i thought to give it a shot on the forum. My customers delivers a clean exel file with the info i need to create a list of EAN13 barcodes. I thought an Ean13 code should have 12 numbers as input. My customers uses 13 numbers in the exel file. One number to much? Yes and no, it seems that the last control number that is normally added with barcode creation is allready added to the input file. The barcode software we used to have ignores the last controlnumber when added with input. Fusion pro simply does not create the barcode because there is one number to many. Is it possible to create a rule, based on the EAN13 barcode rule, that erases the last number or something else to solve this problem. We all know that asking the customer to use 12 numbers instead of 13 is not an option. :) I have no knowledge about Javascript !
Link to comment
Share on other sites

Without testing it myself, I would think you don't need a rule to create the check digit since you have it already. Just apply the font to that field in your text box.


It may need encoding though, so you could just create a rule trimming the last character off and using that in the barcode rule.


Just tested it and you do need to use the rule. This should work. Create this text rule and then use the rule as your field to input into the Barcode Rule.


return Right(Field("YOUR DATA FIELD"),12)

Edited by dreimer
Link to comment
Share on other sites

thank you verry much for the quick reply. :) This gives me a good feeling about this community. There is one problem, i made a new rule using your code with my own data field. When i ask to validate i notice 1 digit is trimmed off my value. That's good but it is the on the wrong side. The digit is trimmed of in the front of my complete number and it needs to trim the last digit. How can i adjust this minor error? One other thing where i doubt this will work on my version "...and then use the rule as your field to input into the Barcode Rule...". I do not seem to have an option to do this? Edited by larkmenaerts
Link to comment
Share on other sites

Change the word "Right" to "Left" in the JavaScript and it will grab the 12 digits from the other side.


When you create the rule for the barcode the very first dropdown should be "Choose a Field", choose the rule name you created to trim the barcode. You might also consider prefixing your rule names with the word "rule_" so you can clearly identify them in the list.

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.

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