Fletch Posted February 2, 2017 Share Posted February 2, 2017 Hello fellow creators. The company I work for has a customer insisting that we create a 128 C barcode in order to be eligible for a big job. I see where there are rules built-in to Creator for 128 and 128 B. Is there a way to create a 128 C? Quote Link to comment Share on other sites More sharing options...
Fletch Posted February 2, 2017 Author Share Posted February 2, 2017 I m going to add some specifics to this. I understand that the 128 bar code will automatically switch between A,B and C to give the best possible bar code. What we need is a rule that will fail if a set number of digits are not present (like on a UPC code) and if there are any 'Alpha' or 'Special' characters (non-numerical) in the data. I know we can verify all this in the data before ever getting to FP, but our customer is telling us that our competition is able to do this. ( I have my doubts, but I don't know everything) So, can a rule be made to verify the contents of a record are numeric only and have a set number of characters? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted February 3, 2017 Share Posted February 3, 2017 I m going to add some specifics to this. I understand that the 128 bar code will automatically switch between A,B and C to give the best possible bar code. What we need is a rule that will fail if a set number of digits are not present (like on a UPC code) and if there are any 'Alpha' or 'Special' characters (non-numerical) in the data. I know we can verify all this in the data before ever getting to FP, but our customer is telling us that our competition is able to do this. ( I have my doubts, but I don't know everything) So, can a rule be made to verify the contents of a record are numeric only and have a set number of characters? Well, I'm not sure what the "set number of digits" are for your requirement, nor exactly how you want the rule to fail, but yeah, JavaScript is great for that kind of input validation: var s = Field("YourFieldName"); if (s.match(/\D/) || s.length != 12) // <- or whatever length you want to enforce return '<span color=Red>Error: Barcode data must be 12 numeric digits!</span>'; //else return '<span font="IDAutomationC128M">' + TaggedFromRaw(Make128Barcode(s)) + '</span>'; Quote Link to comment Share on other sites More sharing options...
Fletch Posted February 3, 2017 Author Share Posted February 3, 2017 Thanks, Dan. I will give that a try. As far as failing, I guess however a UPC code fails if the number of digits is wrong. Or simply flagging it in the log. Quote Link to comment Share on other sites More sharing options...
Fletch Posted February 3, 2017 Author Share Posted February 3, 2017 Here's the message I get when I run the rule. The field has 30 numerals in it, so I changed the number in the rule from 12 to 30 in both places. I also inserted the field name. Word <font=> does not fit in frame after line 1. The amount of text inserted into a flow exceeds the depth of all frames in the flow <>. Text is truncated. Text does not fit in the last frame on page 1 at (0.30, 0.11). Job ended 13:47:15 - 1486147635. Total Job Time: 1s Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.