1 2 Previous Next 19 Replies Latest reply on Jun 30, 2017 8:04 AM by gofmp15

    Barcode to populate multiple fields with one barcode - iPad scanner

    andydawson

      Hi All,

       

      I'm new to Filemaker (ok with Access though!) and I'm trying to populate multiple fields using a single QR Code being scanned using an iPad.

       

      I'm using IDAutomation software within a long standing Access database to generate a QR code. I have coded ~d009 [Tab] (and tried ~d013 [Carriage Return]) into the QR code in an attempt to get the barcode to advance to the next field on Filemaker....with no luck. It interprets the tilde command, because it reflects in the data that's entered however, it will not move to the next field in the form.

       

      I have ticked the options to move to the next field in Filemaker. Tab, Return and Enter are all ticked, with no luck.

       

      I can only think that the command to move to the next field on an iPad is different, therefore I need to code this in to the barcode.

       

      Has anyone else managed this, or have any other ways of achieving the desired result?

       

      For information, the fields are not fixed in length, they can vary massively.

       

      Thanks for any help.

        • 1. Re: Barcode to populate multiple fields with one barcode - iPad scanner
          schamblee

          Use the script trigger onObjectModifify in the barcode field, then run a script with the  "go to field" script step with the name of the field you want to go to. 

           

          basic sample Dropbox - BarCodeSample.fmp12

          • 2. Re: Barcode to populate multiple fields with one barcode - iPad scanner
            gofmp15

            FileMaker does not react to any code inside a barcode that is inserted into a container field. It places the barcode into a container and displays it as a picture. You can grab the container attribute for the barcode and insert that into a second field. The data could be a single line of numbers or as many as 4000-8000 text characters for a QR code.

             

            Some third party barcode scanners can return a carriage return but IOS does not so the script trigger idea by schamblee is needed.

             

            Let's assume you have a container field in IOS and snap a barcode. It becomes a graphic. Now you can have calculated fields  or use a script to:

             

            GetContainerAttribute ( Barcode::Barcode Container; "all")

             

             

            GetContainerAttribute ( Barcode::Barcode Container; "barcodetext")

             

             

            GetContainerAttribute ( Barcode::Barcode Container; "barcodetype")

             

            Since the barcode is captured as a graphic, if I don't want the added overhead I use a global container field for the barcode and fields for the attributes.

            • 3. Re: Barcode to populate multiple fields with one barcode - iPad scanner
              jbante

              Andy didn't say exactly how he was scanning the QR Codes in the original post. But if he's using FileMaker Go's Insert From Device script step, he has the option to use a text field as the target of the step, in which case the data encoded in the QR Code does not have to be parsed out with GetContainerAttribute.

               

              Andy, it appears that whatever scanning method you're using is dumping the full encoded data into your first target field without interpreting the data as a stream from a keyboard. FileMaker's options to switch fields in response to Tab or Enter keystrokes only apply to keyboard (or keyboard-like) entry mechanisms. Tabs and Carriage Returns in the data won't trigger the same actions in data entered via Insert From Device or pasting from the clipboard.

               

              Instead, you'll want to write a script to parse out the separate field contents from the full data set in the QR Code using the text parsing functions.

              1 of 1 people found this helpful
              • 4. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                philmodjunk

                With Insert From Device, the next step in your script can move the focus to a different field, though for multiple scans, I'd give first consideration to scanning into one field, but many records, not one record with many fields.

                • 5. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                  andydawson

                  Hi All,

                   

                  First off, thanks for the quick replies! It's given me food for thought.

                   

                  I could have expanded slightly on my question...The single barcode scan would be required to fill in up to 5 other fields in Filemaker. So, I scan the code, the Order Number, Description, Client and Quantity Required fields would all be filled in. From reading the above, the text parsing option seems to be the best because having looked at mightydata.com for information, it appears to be pretty simple and given that we have full control over what is in the barcode, I can code in start and end 'markers' to make this easier.

                   

                  My only other thought is if I can reference live Access tables from Filemaker. If I can do that, I can simply barcode the unique ID and pull in the rest of the data. I have no experience of this, and cannot find good enough documentation as to whether this is a good thing to do or even if it's possible.

                  • 6. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                    bigtom

                    If you can get the barcode to be formatted as JSON with keys and values you can easily do this with a script and scanning to a global field. I like doing it this way. Here is some sample data, QR code and a demo file of it setting multiple fields in one scan using the new JSON functions in FM16.

                     

                    Demo File

                     

                    {"id":"FB1","name":"Donuts","price":1.99,"stock":43,"category":"Breads"}

                     

                    qrcode-2.png

                    • 7. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                      beverly

                      What platform are you on (for reading the Access)? You might research:

                      or the possibility of sharing FMS (ODBC) so Access can see it?

                      Beverly

                      • 8. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                        jbante

                        Beverly has already pointed you in the right direction for making the connection.

                         

                        Your idea to encode only a unique ID in the barcode, and look-up everything else from the database is something that has worked well for me before. I've created schemes where the ID in the barcode doesn't even necessarily represent the object it's attached to; the ID just represents the barcode itself, which could be attached to whatever object the organization wants. When the barcode gets scanned, any associated information is pulled from the linked barcode ID record. Different fields can be stored for different barcodes, and the data linked to a barcode can even change without printing a new barcode.

                         

                        The crux of making that work is that everyone using the barcodes needs access to the same database. If a barcode needs to communicate multiple fields to an outside party, that doesn't work so well. GS1 maintains a standardized approach to doing this, including a standard schema of "application identifiers" ("AIs") (what we'd call "fields" in FileMaker vocabulary) and conventional ways of encoding AIs in barcodes. GS1 doesn't use any delimiter between the AI code/label and the data because they are constructed so the recipient can know exactly how long each is, and it only uses delimiters between two data fields if the first field is variable-length. This makes a much more compact symbol than a verbose format like JSON, but it makes parsing more complicated. Having multiple fields be as compact as possible is a big deal when you're trying to pack them all into a barcode, even a QR Code. Barcode Creator includes some helper scripts for doing the heavy lifting with generating and parsing GS1. (Disclosure: I wrote Barcode Creator.)

                         

                        Once, I also make a custom scheme even more compact to fit about a dozen fields into Code 128 (1D), but I don't think you want to go down that road if you don't have to.

                        • 9. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                          bigtom

                          jbante if it involves a barcode I figured you would have tried it. A dozen fields in Code 128? Amazing.

                          • 10. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                            gofmp15

                            QR Barcodes can store up to 4000 or 8000 characters.

                             

                            A little imagination can scan the barcode and get the text it represents and do magical tricks with it.

                             

                            Create a QR barcode that contains something like this:

                             

                            <Record ID> 2234

                            <Customer ID> 2322

                            <Invoice Number> 88989

                            <Color> Blue

                            <Size> Large

                            ....

                            And so on.

                            Now simply take that apart with a script and do what you want with it.

                             

                            Note: with a QR barcode it would be possible to have the data in it to fill in the 5 fields mentioned above.

                             

                            Since the barcode can be read with anyone with a scanner, you might want to encrypt the data, etc.

                            • 11. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                              bigtom

                              iOS camera has some trouble with dense/small codes. So I am not sure 8000 characters on a 150px QR would work in practice.

                               

                              I will try it out.

                              • 12. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                                bigtom

                                Although it does takes up more characters, with the new JSON functions the barcode is easy to encode/decode as seen in the demo file.

                                • 13. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                                  gofmp15

                                  Glad I could inspire to new horizons

                                  • 14. Re: Barcode to populate multiple fields with one barcode - iPad scanner
                                    andydawson

                                    Ok, so I'll mark the correct answer as jbante because I have gone down the parsing route for the time being. Using mightydata.com as a great reference for parsing.

                                     

                                    However, really appreciate the links from beverly, I will take a look at that.

                                     

                                    Ultimately, it's going to be best to establish a live link to our Access tables and just use the unique ID to pull the rest of the information through, which will be the next 'version' (after I've figured it out!).

                                     

                                    Will also look at the JSON route, so cheers bigtom

                                     

                                    Thanks all, good to get helpful responses.

                                    1 2 Previous Next