Last week, I shared an article and video about integrating FileMaker Go with the free app pic2shop. The pic2shop app allows an iPhone’s camera to be used as a barcode scanner to scan UPC and EAN barcodes. In this article, I’m going to take a look at the new CNS Barcode app from Comm-unity Networking Systems. CNS was kind enough to give me early access to the app, which has been submitted to the iTunes Store and should be available very soon. Like pic2shop, CNS Barcode can be integrated with FileMaker Go to scan barcodes using an iPhone’s built-in camera. However, CNS Barcode includes additional features and options, including the ability to generate barcode images. Let’s take a closer look at specific features in CNS Barcode.
In addition to UPC and EAN barcodes, CNS Barcode also recognizes Code 39, Code 128, Databar-14, and QR Code barcodes. The barcodes can be scanned through the camera or you can choose an image containing a barcode from your photo library. While pic2shop requires the phone to be oriented the same as the barcode, I found that CNS Barcode would happily scan barcodes that were upside down or sideways. It will even activate the iPhone 4’s LED flash when needed. The extra light could be rather handy in situations such as scanning equipment tags underneath a desk. One feature I missed from pic2shop was the option to display a keypad when scanning. Sometimes I encounter a barcode that is damaged and it’s nice to be able to manually enter a value. Of course this can be done within FileMaker Go, so it’s a minor issue. Here’s an example of a FileMaker calculation to use with the Open URL script step to launch CNS Barcode. The parameters included in this example tell CNS Barcode to use the camera to scan a barcode and then call the “launchurl” parameter as a URL, which resumes the hibernated FileMaker Go file and runs the “Scan” script with the scanned barcode as the script parameter.
"cnsbarcode://scan?method=camera&launchurl=fmp7script%3A//%24/" & Get ( FileName ) & "%3Fscript%3DScan%26param%3D::barcode::"
Note that the launchurl parameter has to be encoded. Without the encoding, the calculation result would look like this:
“::barcode::” is just a placeholder to indicate where the scanned value should be inserted.
I wasn’t expecting CNS Barcode to generate barcode images, but it does. In fact, it will generate barcodes for all of the barcode types that it’s able to scan. The generated barcode can be copied to the clipboard or saved to the photo library. In addition, the cnsbarcode:// URL scheme can be used to generate barcodes from other apps, such as FileMaker Go. The value is sent in the URL and the barcode image is returned on the clipboard. One of the great things about a camera-based barcode scanner (or “imager”) is that it can read barcodes off of a computer display or an iPhone screen. For example, many airlines can read barcodes on passengers’ mobile phones as electronic boarding passes. A 2-D barcode format, like QR Code, can contain up to a few thousand characters. CNS Barcode gives us the ability to create some interesting new workflows with FileMaker Go. Barcodes can easily be generated and stored in container fields. Then they can be included in forms, reports, and even email. Information can be exchanged directly between devices by generating and displaying a barcode on one device and reading it from another.
Profiles and Options
CNS Barcode includes many useful options. For example, multiple barcodes can be scanned and then returned to FileMaker Go in a return-delimited batch. Scanned barcodes can be copied to the clipboard or saved as photos. URLs contained in barcodes can be automatically launched. The app allows the creation of multiple “profiles” to name sets of options. A profile can be used in different ways, for example you can specify one profile for standalone use and a different profile when using the cnsbarcode:// URL scheme. Profiles can even be created using the URL scheme. All of the options and the cnsbarcode:// URL scheme are clearly documented inside the app.
CNS Barcode is a great companion for FileMaker Go. It isn’t a free app, like pic2shop, but it’s a richer and more versatile tool that FileMaker developers can leverage to create exciting new solutions with FileMaker Go. I’m looking forward to opportunities to integrate it into our customers’ systems.
CNS Barcode will be available here: http://www.cnsplug-ins.com/iOS/CNS_Barcode More information on the fmp7script protocol can be found here: http://help.filemaker.com/app/answers/detail/a_id/7786/kw/fmp7script