Zero Point Data Ltd. An Elegant Barcode Solution in FileMaker Troi Serial vs FileMaker 10 Script Triggers Presented by Chris Van Buren 23 June 2009
What is a Bar Code anyway? • It is just a bit of extra coding plus a font • Code 39 (also called 3 of 9) is just the data with * to start and stop. *1324* - data in field Install bar code font and that’s it. • More advanced codes contain extra information such as checksum digits. -Free calculations on the web to generate correct information in FileMaker for printing. -Bar code scanners have logic to decode built in so incoming scan information is already correct • Some label printers have built in barcode fonts More complex but potentially more bulletproof than using Windows driver. Best if you drive directly using printer language. May mean plugin to directly push printer language out parallel or serial port.
What is a Bar Code Scanner anyway? • Come in many flavours - USB, Serial (DB9) and others. -CCD scanners are less expensive and more robust -Laser scanners scan better but cost more. • USB is most common USB scanner when plugged in is just an additional keyboard • Scanners automatically decode common symbologies • Scanners can be programmed using special fonts KEY to making an elegant solution Programming allows you to prefix or suffix scanner information with additional characters
Less Elegant Bar Code Solutions • Just scan Works fine with USB scanner User must enter the field that needs to receive the data Same as typing • Take advantage of Ctrl-1 ( ⌘ -1) etc on Scripts Menu to fire script by programming scanner with a Ctrl-1 ( ⌘ -1) prefixed to start of scan. • DISADVANTAGES -Not user friendly as user must manually go to the correct field -Means script menu must be showing -Not what users expect from a bar code scanner
An Elegant Barcode Solution Using Troi Serial • Works really great - used in my FileMaker 6 commercial solution (OpticBox) at 28 sites for years. A great feature. Great for finding customers and sales as well as selling items. • Troi Serial has key features -Fires script when scan occurs -Stores information scanned - can then be retrieved with a call to the plugin • Implementation is: -Write script to collect scan and then do the correct thing. -Need some thinking and testing (interrupting other scripts - yanking user away from dialog layouts - context) -If scanning your own codes you can embed information. Customer number always start with “C” Sales always start with “S” etc.
Disadvantages of Troi Serial • You have to buy it! £650 • Needs a serial scanner and a real 9 pin serial port Many PCs not longer include USB to serial adapter are available (£20) but need installing • Needs a real serial scanner • Scanner needs extensive programming OpticBox had a scanner configuration page with 10 special barcodes that needed to be scanner in order. • Support burden - scanners can lose programming, Windows “forgets” serial adapter and gives it a different COM port etc.
Can we do it with Script Triggers? • Answer is YES! • I was very skeptical -Where are we going to store the scan data? -Storing scan data means a Go to Layout and a Go To Field But data is coming at a fast rate just like a very fast typist. Would data be lost during layout change? -How to implement across whole solution?
Solution using Script Triggers • Set ScriptTrigger OnLayoutKeystroke Disadvantage - no way to apply to entire file Advantage - can pass Get(LayoutName) and achieve better control • OnLayoutKeystroke Intercepts every keystoke and runs script. Program scanner with prefix code ^ (not ideal - perfect would be character that cannot be typed and is common on Mac and PC - “±” should do it but does’t work with my scanner) Script checks for ^ then switches layout and goes to a global field. Carriage return ends code (default on my scanner) Script just: -Changes to a known global field when ^ is typed -Collect data in that field -Puts data into a global and does something when CR typed. Something here is to just return where you started but could be anything.
TrackPoint Demo Using Script Triggers • Manual typing (slow motion) • Scanned • Script Debugger On
Why I’m Impressed! • OnLayoutKeystroke is key to my anxiety but it seems to work great: Typing with OnLayoutKeystroke is absolutely normal. Seems very reliable. Great job FileMaker! • Advantages -Cross platform -No plugin and no extra costs -Minimal programming of scanner -Hassle free USB scanner • Any disadvantages? Only that OnLayoutKeystroke must be set for each layout but this is also potentially a real advantage.
Why you still might want Troi Serial (or another plugin). • You may want to print using a dedicated label printer. • These can be driven with a Windows driver but are much slower and less reliable this way. -Most have no Mac driver at all -OpticBox solution worked this way - was a MISTAKE - I would go down raw printer language route if I was rebuilding OpticBox • Best performance is to push raw printer language out of serial or parallel port. Not sure about parallel port plugin but I think Productive Computing had one • Don’t have to learn printer language Use program with printer to make what you want. Intercept the printer language code. Insert your FileMaker fields into it
Recommended Resources • Free fonts on the internet Code39 is easy to get, super simple to implement and does most jobs well Pretty much 0-9 and upper case A-Z only • Peninsula Barcode (http://www.peninsula-group.com/) UK company who really know their stuff and know FileMaker & Mac well Have BarCode X plugin for printing codes which is very powerful. (but requires fonts) Sell Pheonix II reader which has worked well • Six Fried Rice (http://sixfriedrice.com) FileMaker Barcode Plugin Seems to work well - no font needed - Code 128 only • Brian Dunning (www.briandunning.com) Very attractive font free and plugin free solution
More Information • Call or send me an email I’m happy to share knowledge about my bar code experiences. No charge or obligation. chris@zeropointdata.com 01291 689966 www.zeropointdata.com • <Shameless Plug> Do have some time availability to consult on bar coding or solution development in general. </Shameless Plug> • THANKS FOR LISTENING AND THANKS TO FILEMAKER
Recommend
More recommend