1. You can sometimes do this in the barcode scanner configuration itself. This will depend on the model of the scanner and also the barcode type you are scanning.
2. Alternatively, in TracerPlus, you can create a new calculated field that would use the Add function to add a static/constant '0' to the barcode field and use this calc field in your lookup instead of the actual barocode scan itself.
Another option that can be used here is TracerPlus Form logic. It should be possible to do this with two logic items. First construct 2 fields, one to hold the raw barcode and another to hold the barcode with the leading zero. Now using logic, set the value of the second field to be 0[*0*]. You can trigger this logic on the Afterscan event in the raw barcode field. This will get your leading zero barcode into the second field, so now you just need a way to trigger the lookups off that value.
For your second logic item, you can try a Field value Changed event with an Afterscan action on the Leading zero Barcode field. This should Active the lookups any time a new barcode is scanned into the Raw Barcode field.
Corey your solution worked, but only if the raw data is always at the same length. By padding a value, this value should always keep the same length By example if we want 14 chararacters with Leading Zeros
and 123456 is
You cannot do a TracerPlus lookup on partial data like that but custom SQL could probably be configured to do that.
Another option similar to Corey's is to force leading zeros to a string to match a certain length using Calculated fields (ADD and RIGHT) by adding a static field of "0000000000000" with your scanned barcode and then taking the RIGHT, 14 of that result.
I have attached a sample project attempting to outline what I am describing.
EDIT: Sorry, this attachment failed. Let me know if you would like it and I can send it via email.