when i scan a bar code in a field in filemaker , always generates a additional character, how to avoid this?
Krodaz, your barcode scanner is probably configured to send a 'control' character of some kind after the scan. This character is typically a carriage return or a line feed and is used to 'continue or resume' a script. In the manual for your barcode scanner there should be instructions for turning if off if you don't need to use it.
Generally speaking though, that control character can be useful. You can set up a scrip trigger to be tripped by it and a script can then respond to the scan and process the scanned data as you see fit.
As an example, a return, tab, or enter character at the end of the string can be set up to trip an OnObjectExit trigger. Not only can this auto-mate the scan, but if you have to manually enter a code, you can trip the same trigger manually. (Ever see a cashier at the supermarket type in a code manually when the bar code label won't scan?)
Thanks, I observe that if the field is based on number, there is no problem, but the field is now configured as text, that is because too many products in the system has not only numbers, in example a ski could be LT-22, so wheat's happen in I change all to numbers?
Phil, I have tried to make a script trigger, but don't know how to give instruction to return to last character generated
First you need to identify the character that is appended. Also note that many barcodes include a "check digit" computed from the other characters that make up the bar code. This is used for error checking to confirm that the bar code scan was error free. You can research different bar codes on line to learn whether such a digit is included and also what formula is used to calculate it.
If the final character is either the return, tab or enter key characters, you can set up a field's behavior so that this key stroke exits the field. Then you can set up the onObjectExit trigger to perform a script to process the scanned data.
My guess would be that the number field is ignoring the non-number control character that your scanner is appending to the data it scans. Depending on your solution's needs, you should be able to either turn off the extra character that your scanner is providing (check the manual for your scanner), or have FileMaker delete the extra character (probably via a script trigger that fires a script that checks the last character in the field and deletes it if it's the control character from the scanner- this script could also do any other data processing that you may need).
Retrieving data ...