2 Replies Latest reply on Feb 15, 2010 3:14 AM by draychrys23

    how to perform record search



      how to perform record search


      Hi, I have created a home page on my database with various buttons, and I want to put a bar code search on to it but I am not sure how. I want to type the bar code in and then the record to pop up and then add or minus the amount of stock. I am using filemaker 10...


      Any help appreciated...



        • 1. Re: how to perform record search

          Type in the number the barcode represents (and is often printed with the barcode), scan the bar code into the field or both?


          If your scanner is set for keyboard emulation (the default setting on most scanners) both options should work the same way.


          Here's a simple "manual" method:


          Click Find

          Type the barcode into the field of your database where you store your barcodes, or put the cursor in this field and scan a barcode.

          Click Perform Find.


          I believe you'll want to script this so that it all happens automatically, but make sure you can get the above method to work for you first as that'll confirm you have your basic table and barcode scanner set up correctly.


          A script for the same thing:

          Define a global text field, gBarCode. To make it a global field open the field options for the field in Manage | Database | Fields, click the storage tab and select the global storage option.

          Put gBarCode on your layout.


          Now a script:

          Enter Find Mode[]

          Set field [YourTable:: Barcode; YourTable::gBarcode]

          set error capture [on]

          Perform Find []

          If [ get ( FoundCount ) = 0 ]

            Show Custom Dialog ["no records for this barcode where found..."]

          End If


          Put a button next to the field to run the script or use an OnObjectExit script trigger on the gBarCode field.


          • 2. Re: how to perform record search
               Thank you for replying to all of my threads i really appreciate it. i have completed the script above and works great thank you.