7 Replies Latest reply on Feb 16, 2014 7:32 PM by BookMan

    ISBN search using Camera

    BookMan

      Title

      ISBN search using Camera

      Post

           I am very new to file maker, but I am finding it very useful, and user friendly. I am in the book trade and I am using it to keep track of the books I have on hand. I have created a layout that will show me all the information I need to know about my inventory.

           When I am purchasing I use an ipad or iphone and need to quickly search by Author or ISBN (barcoded). I would to know how to write a script that will allow me to search the ISBN by scanning the barcode with the camera in the iOS device. If it returns no results then I would like to search by Author. If it returns no results then I would like to add the ISBN to a new table. If anyone can help with this I would really appreciate it!

            

            

            

            

        • 1. Re: ISBN search using Camera
          philmodjunk

               This is not the full answer but it should get you started:

               Define a global text field, gBarcode and put it on a field somewhere. Run this script to search your table for records with that barcode:

               Go to Layout ["BarcodeLayout" ( globalsTable ) ] ---> go to the layout where you have placed gBarcode.
               Insert From Device [---> select the options needed for bar code scans and specify gBarcode as the field into which to insert the scanned text.
               Commit Records
               Go to Layout [Select layout that you plan to use to show your find results here]
               Enter Find Mode [] ---> clear pause check box
               Set Field [YourTable::barcode ; Globals::gBarcode ]
               Set Error Capture [on]
               Perform Find []
               If [ Not Get ( FoundCount ) // no records found ]
                 Do what you want when no item with this bar code is found
               End If

               Note: there's a bug that has been identified in Insert From Device when using the camera to take pictures and to scan bar codes at the same time:

          • 2. Re: ISBN search using Camera
            philmodjunk

                 For More Information on the bug, see:     Insert from Device(Bar Code) doesn't scan after Inserting from Camera

                 This is one of many acknowledged bugs that can be found in the Known Buglist for Filemaker GO thread here in the Report an Issue section of the forum.

                 It can also be downloaded as a database file from:    https://www.dropbox.com/s/jt09b82i0xijbu3/FMP%20Bugs.zip

            • 3. Re: ISBN search using Camera
              BookMan

                   Thank you very much. This worked very well!

                   I now need to trigger a different script after text has been entered in a global field and the enter/return key is pressed. how do I set a trigger in this way?

              • 4. Re: ISBN search using Camera
                philmodjunk

                     The enter and return keys are two different keys, but you can set either or both to exit the field when pressed if you set that up in the Inspector's behavior settings on the Data tab.

                     Then the OnObjectExit trigger can be used to perform the script.

                • 5. Re: ISBN search using Camera
                  BookMan

                       Thanks,

                       The only problem with this is I need to be able to move between fields on this layout without running the script. if I set it up the way you have described if I click or tab to another field it runs the script. Is there a way I can set it to trigger a script specifically when enter is pressed within that field?

                        

                        

                  • 6. Re: ISBN search using Camera
                    philmodjunk

                         OnObjectKeystroke can perform a script.

                         Get ( TriggerKeystroke ) can return the character pressed.

                         Exit Sript [False] can keep the key that was pressed from being entered into the field.

                    • 7. Re: ISBN search using Camera
                      BookMan

                           Thanks for your help!