Import the file into a global field, and use a script to compare the dates, and update if necessary. BTW - what barcode scanning system are you using?
Sorry, I'm a newbie to filemaker pro.
How do you import the file into a global field and write a script that would take the date in the global field and compare it with the date in the database? An example would be great. I will try to look online to learn more about filemaker pro to do this but any help would be appreciated.
thanks for your time etripoli.
The barcode scanner is a WASP WDT2200 programmable scanner.
Oops, might have been thinking of a solution that is probably more complicated than needed. If you're only dealing with a small number of lines to import, create a table (scan_import) with one text field (data), and a calculation field (parsed_data) that = Substitute ( data; ","; ¶ ) [type: text]. Create another calculation field (scan_barcode) that = GetValue ( parsed_data, 2). Relate that field to the Barcode field in your current table.
Here's what the script could look like:
Go to Layout ["scan_import" (scan_import)]
Show All Records
Delete All Records [no dialog]
Import Records [Add; ]
Go to Record/Request/page [First]
If [GetValue ( scan_import:: parsed_data; 1 ) > part_numbers::date ]
Set Field [part_numbers::date; GetValue ( scan_import:: parsed_data; 1 )]
Set Field [part_numbers::employee; GetValue ( scan_import:: parsed_data; 4 )]
Set Field [part_numbers::location; GetValue ( scan_import:: parsed_data; 3 )]
Commit Records/Requests [No dialog]
Go to Record/Request/Page [Next; Exit after last]
After a few learning curves I was able to use the script you wrote and got it work.