5 Replies Latest reply on Jul 29, 2013 2:36 PM by philmodjunk

    Search Field and Button - Script help

    AKoontz

      Title

      Search Field and Button - Script help

      Post

           I've created my own search field and button to search all the records in my database. I assume this is super easy but when I've been trying to use the Find Matching Records script there is either an error or performs the search incorrectly.  What I'm exactly trying to perform:

           Type a number into the Search Field. Hit the search button. And find the record that matches that number in the Serial Number field on the record.

            

           I do not want to use the FM default 'Find' function because I have a system where I can scan the barcode into the Search Field

            

           Thanks

        • 1. Re: Search Field and Button - Script help
          philmodjunk

               Specify global storage for the search field. Use a script similar to the examples found at: Scripted Find Examples

               For scripts to automate scanning when the barcode scanner is connected to the computer and running in Keyboard emulation mode: Need help writing script to integrate barcode scanning

          • 2. Re: Search Field and Button - Script help
            AKoontz

                 PhilModJunk, thanks for the link, however I do not want to use the perform find function. Any other reccomendations?

            • 3. Re: Search Field and Button - Script help
              philmodjunk

                   You'll need to explain why you do not want to use the perform find function before I can suggest an appropriate alternative.

              • 4. Re: Search Field and Button - Script help
                AKoontz

                     I had a previous script with using Find Matching Records and it seemed much more simple. It has been a while since I've used FM again and cannot remember the exact script.

                      

                     I am looking to scan my barcode which will then have the corresponding barcode number appear in the search field. This I have under control. From here I want to hit the search button I've created and have the matching record be returned. I want the barcode_search field to search and match the barcode field in my records

                      

                     The Perform Find, Search etc. scripts I have tried are not as clean and easy as I remember as the Find Matching Records. There is always one more button or step to take

                • 5. Re: Search Field and Button - Script help
                  philmodjunk

                       Find Matching records won't work in this context as it requires entering the scanned data directly into the same field of the same field you intend to search. That would generate a new record with the same barcode as at least one existing record and does not sound like what you are trying to do here.

                       The process I am suggesting can be fully automated and does not require the user do anything more than scan the barcode. Scannng a barcode trips two different script triggers in sequence. The first performs a script to put the focus in the correct field. The second performs a script that would search your database for existing records in your table with the same barcode. Such a find script even handles cases where there is no match without issue and if the scanner goes down or a barcode is defaced and not scannable, the user can still enter the barcode value into the text field and press tab/enter/return to trip the same script trigger and thus perform the needed find.

                       For examples of scripted finds, you might examine the examples found here: Scripted Find Examples