14 Replies Latest reply on Jan 23, 2014 7:59 AM by philmodjunk

    Bar Code Integration? Can't find it

    TravisWinnie

      Title

      Bar Code Integration? Can't find it

      Post

           I upgraded to FileMaker v13 because I wanted to utilize the bar code capabilities to help keep track of production items in our plant, but I can't seem to find anything about bar codes in the v13 program. 

            

           Can someone point me in the right direction? 

        • 1. Re: Bar Code Integration? Can't find it
          philmodjunk

               Barcode integration is a new feature of Filemaker GO 13 for use on iOS devices such as an iPhone or an iPad.

               Are you setting this up for FileMaker Go use?

               If so, the new script step, Insert From Device can use the camera to take a picture of the barcode, decode it and insert the decoded value into a text field. You can look it up in FileMaker Help. (I've just started playing with this in one of my personal use projects, and it seems to work fairly well.)

          • 2. Re: Bar Code Integration? Can't find it
            TravisWinnie

                 Okay awesome!  I do plan on using FileMaker Go once this is up and running, right now we're going to test out the bar code capabilities and make sure it'll work for what we want it to do. 

                 Thanks for your help!  I was worried I made a mistake haha

            • 3. Re: Bar Code Integration? Can't find it
              philmodjunk

                   Here's what I've figured out:

                   Tap a button to start a script with Insert From Device. You need to be on or go to a layout with this field on the layout.  Set up the field with an OnObjectModify script trigger to perform a script to automatically process the data once the scanned data is inserted into the field.

              • 4. Re: Bar Code Integration? Can't find it
                TravisWinnie

                     Waiting for my Apple device to come in, right now currently using just Pro to get everything set up.  I'm saving this so I can try your method.  I'll let you know how it works and if I figure out anything cool I'll post for you as well. 

                     Thank you for your help I appreciate it, this is my first project with FileMaker as well as bar codes so it can be a little overwhelming but the support I've been given from the community has been nothing short of amazing. 

                • 5. Re: Bar Code Integration? Can't find it
                  tedesco12

                       Hey PhilMod, your great. I'm in the middle of working this out now also. i can't seem to find the script "insert from device" you mentioned 

                  • 6. Re: Bar Code Integration? Can't find it
                    philmodjunk

                         It's a new step in FileMaker 13. If you are using an older version, you don't have that step to include in your scripts.

                    • 7. Re: Bar Code Integration? Can't find it
                      philmodjunk

                           Oh yes, and as I've continued to work with this new feature, I've found that I don't need to use a script trigger like I did with USB type scanners connected to a computer using FileMaker Pro. Since the step automatically waits for the hardware to focus and capture an image of the barcode, you can just include code after the scan to process the scanned barcode data.

                           Set Error Capture [on]
                           Insert From Device
                           IF [ Get ( LastError ) > 0 // user tapped the "cancel" control]

                             do what you need to do if scan was canceled here

                           Else

                               Process the scanned data here

                           End IF

                      • 8. Re: Bar Code Integration? Can't find it
                        tedesco12

                             hi Phil, I have FMP 13 advanced with FMP go on an iPad and iPhone. using the iPad mostly. i went to create the script you listed above and i noticed that the insert from device step under the fields in manage scripts is not accessible. its there and i can see it. its just written in light see through grey rather then black. looks like its indicating its not functional for some reason. 

                        • 9. Re: Bar Code Integration? Can't find it
                          philmodjunk

                               That is a "compatibility" indicator. If you select iOS in the Show Compatibility drop down below the list of script steps, it will not show as grey. And you can add it to your script whether or not it is black in color.

                               But as this step indicates, you can't execute this script from FileMaker Pro, only Go.

                               When I test my scanning script in Pro, I disable the script step (a FileMaker Advanced feature) and enable a set field step in its place to enter a barcode into the field. Then I switch things back, disabling the set field and enabling the Insert from device steps before testing the script on an iOS device.

                          • 10. Re: Bar Code Integration? Can't find it
                            tedesco12

                            Set Error Capture [on]

                                 Insert From Device
                                 IF [ Get ( LastError ) > 0 // user tapped the "cancel" control]

                                   do what you need to do if scan was canceled here  <---- how do i program that into the script in the get last error section in quotes? 

                                 Else

                                     Process the scanned data here

                                 End IF

                                 also, i have a part next to me with a bar code on it, can i just set up the script and then try it on my phone ? 

                                 also, I'm trying to see what I'm actually doing here. when i scan this. it takes the information, (part number and other information) and allows me to place it into fields right ? how do i tell it what fields to go into ? and i believe you stated i need the field on the products layout it seems. since thats where i hold my parts inventory. 

                                 so i make lets say a bar code field, and make it a button and set it to  OnObjectModify? then make that button run that script I'm making above and its that simple?  ?im super new, sorry

                                  
                            • 11. Re: Bar Code Integration? Can't find it
                              philmodjunk
                                   

                                        <---- how do i program that into the script in the get last error section in quotes?

                                   Huh? I can't understand the question. Much of the time, the script steps there would just be to return to the appropriate layout/window and exit the current script.

                                   

                                        also, i have a part next to me with a bar code on it, can i just set up the script and then try it on my phone ?

                                   What I do is share the database on my laptop and then use WiFi to connect to the DB on my iPhone as a client. I can then do quick tests of my solution without having to copy the file back and forth between phone and computer. But you may find that you need to periodically close FM GO on your iPhone and close and re-open the database file on the computer to iron out glitches that seem to be caused by making changes to the design while sharing the file with the iPhone.

                                   But your scanning script may be part of a much more complex process. My scan script currently is many lines of code in length and, depending on the button I tap on different layouts, may look up an existing item in the database and display details about it, Make changes to different fields for a record found using the bar code, add it as a new item in the table, or associates the current item in a table to this newly scanned barcode. And it includes code that offers to add a new record or use another search method to find an existing record if the barcode is not found in the database.

                                   I then added a custom function that validates UPC codes so that I could add code that validates the scan and offers the option of manually entering the code, canceling the scan, or trying again.

                                   And some options loop the script to scan multiple items until I tap the cancel option while others just scan a single item. And this is all one script. wink

                                   So I also needed to use FileMaker Advanced's script debugger and data viewer to test and evaluate my script. To do that, I needed that set field step to stand in for the Insert From Device script step during testing and development.

                              • 13. Re: Bar Code Integration? Can't find it
                                tedesco12

                                     your script sounds super intriguing ! however I'm still a little slow on the scripting process and i don't know if i would be able to put the right lines of code in there to do what i need.

                                     do you know where i can find this information out ?

                                     can you help me more in depth then this forum and how much does it cost if so ? 

                                     thanks 

                                • 14. Re: Bar Code Integration? Can't find it
                                  philmodjunk

                                       I mentioned the script to further explain why I find Set Field useful as a trick to use when testing the scan script on my computer and why I don't just test it by hosting the file and connecting to it from my iPhone. It's not really "ready for prime time" yet in my own test DB--I was using it last night and encountered issues with how it manages the multiple user options.

                                       I'd recommend DavidAnders link as a useful starting point for learning more. From there you should keep things as simple as possible and add more features to what you want to do a bit at a time.