MQuine Posted March 22, 2002 Share Posted March 22, 2002 Barcode Help I am trying to set up a simple inventory control list using a barcode reader. I can’t seem to figure how to set up a quantity field that when the same item is scanned it will count the item rather than enter the item again, and if it is a new item place it in a new field. Does anyone have any Ideas? Thanks MQuine Quote Link to comment Share on other sites More sharing options...
dj Posted March 22, 2002 Share Posted March 22, 2002 Originally posted by MQuine:[qb]Barcode Help I am trying to set up a simple inventory control list using a barcode reader. I can’t seem to figure how to set up a quantity field that when the same item is scanned it will count the item rather than enter the item again, and if it is a new item place it in a new field. Does anyone have any Ideas? Thanks MQuine[/qb] Create a file for data entry named BarCodeEntry.fp5 like this: barcode global text terminate global number Than create an relationship with your inventory file, let's say named Inventory.fp5 Relation name BarCodeRel, allow creation of related records barcode to barcode (supposing you have a field also named barcode , text, indexed, in your inventiory file) Now, create scripts named "Start ", "Stop", "Input" Start setField [terminate,0] setField [barcode,""] go to field [barcode] PerformScript [input] Stop setField [terminate,1] halt script Input Set errorCapture[on] SetField [barCodeRel::quantity,"BarCodeRel::quantity+1"] SetField[barcode,""] //clear field PauseResumeScript[0:0:1] if [ not terminate] PerformScript[input] end if Create two buttons, start and stop, with respective scripts. You should also configure the barcode reader to tab-out the field after reading the code. HTH Dj 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.