Danovh Posted May 22, 2009 Share Posted May 22, 2009 I need to make a USP-A Barcode, but the data file has 2 extra digits at the end. How do I set a Rule to remove those digits at the same time making the USP-A Barcode and what font to be used? Link to comment Share on other sites More sharing options...
esmith Posted May 26, 2009 Share Posted May 26, 2009 The easiest method is probably to use the USPA Barcode Rule built into FP. Select your field(s) for creating the code and use the default font, AdvFIM, then click the "Convert to JavaScript" button. Edit the second to last line which reads: final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(MakeUPCABarcode(retstr)) + '</span>'; to instead read: final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(MakeUPCABarcode(Left(retstr,11))) + '</span>'; I added the "Left" function to trim the final variable to 11 digits -- the default number of digits for a valid UPCA barcode (the MakeUPCABarcode rule generates the 12th check digit). Link to comment Share on other sites More sharing options...
Danovh Posted May 26, 2009 Author Share Posted May 26, 2009 Thanks, that worked except for the font. IDAutomationUPCEAN is what I used. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.