February 5, 200817 yr I'm creating a database for storing shipping/receiving records. The information stored in the various fields will be scanned from a product's barcode label. The barcode labels contain part number, quantity, supplier code, etc. Each of these barcodes has a unique prefix such as "P" for part number, "Q" for quantity, etc. Is there a way to create a single field to scan the barcode and have filemaker copy the information to the proper field based on this unique prefix? If possible, I'd like to remove the prefix and just copy the data. For example, scanning Q100 will result in 100 copied to the quantity field. Thanks
February 5, 200817 yr One method would be to give each field on the layout an object name that corresponds to the letter. Your script would then look something like this: Set Variable( $barcode ; gScanField ) Set Variable( $target ; Filter( $barcode ; "PQetc" ) ) Go to object( $target ) Set field( Right( $barcode ; Length( $barcode ) - 1 ) ) You could use GetAsNumber in the last step instead, if the codes are always numeric. Also note that you don't specify the field in the final step.
April 2, 200817 yr Author I'm not sure I understand your response. Here is my scenario: FIlemaker fields: "scan_field" "part_number" "quantity" Scanned data from barcode: "P12345" which represents part number 12345 "Q1000" which represents a quantity of 1000 Is there a way to scan the barcode data into the "scan_field" and, based on the prefix, have it copy to a predetermined field. For example: Click new record. Highlighted field is "scan_field". Scan P12345 into this field, plus a tab. "12345" is copied into the "part_number" field and the "scan_field" is highlighted. Scan Q1000 into this field, plus a tab. "1000" is copied into the "quantity" field. etc.
April 2, 200817 yr If thereis one barcode for each box which reflects all the data, part number, quantity, supplier code etc. You can enter the data into one field. If there is some kind of consistency, then you can use an auto-entry with calculated result for each individual field's data. Look into the functions, Middle (), Position (), Right (), Left (), etc etc.
Create an account or sign in to comment