7 Replies Latest reply on Sep 18, 2013 3:56 PM by kojmichael

    Reading Drivers Lic Mag Stripe


      Is it possible to create a script or function in FMPAdv that will read the following Drivers Lic Scan

      And parse it out so you get the info below and reorder it and fill in the necessary fields?

      If so how do you go about parsing it out with out using some type of programming environment

      like in other development platforms?




      %10710070000 E 01 1509285 ?



      The items needed from the above are:

      LA = State 5th

      NewOrlenes = City 4th

      Davidson = Last Name 1st

      Larry R = First Name 2nd

      1301 Waterbend Road = Address 3rd

      71007 = Zipcode 6th



      All other info is not important.

      Any help or direction would be greatly appreciated.

        • 1. Re: Reading Drivers Lic Mag Stripe

          This should give you the basic idea. The important parsing logic is in Set Variable script step. For setting just 6 fields, you would get by with hard-coded Set Fields, but it's good that we have Set Field by Name …

          • 2. Re: Reading Drivers Lic Mag Stripe

            Thank you erolst for such a fast response.  It is exactly

            what I need.  And to get it to all the DL # all that would

            intel would be to add it to the Set Vars, and i guess more

            parsing setup in the loop process..


            Trying to get my head wrapped around how FM works

            vs my prev dev platform.


            Thank you again.

            • 3. Re: Reading Drivers Lic Mag Stripe

              The Sample worked great but when i tried to put it into the actual program

              it acts like a zombie from WorldWar Z.  It blows away the current new rec

              and trys to pull up the next several and tries to add the really Large Let statement

              into the lastname field.


              I did mod as needed per field and table names but nothing that would cause it to

              go Zombie on me.


              I have the Scan field as txt and the button next to it to parse

              at the bottom of the screen.

              • 4. Re: Reading Drivers Lic Mag Stripe

                You see the "/*" ? The entire calculation has been commented out by FileMakers calculation engine, because some urgently required elements (fields, to be precise) either are missing or were missing when you copied over the script - which then obviously causes not the correct value as per iteration, but the entire calculation string (which is it, since it's commented out) to be inserted.


                I'd say you haven't modded enough, thus the WWZ effect. Why don't you post this undead database with some sample data (compress as zip, click Use advanced editor to get to the upload button etc.) and let me have a go at it with scalpel, pincer and – just in case – a silver bullet handy …

                • 5. Re: Reading Drivers Lic Mag Stripe

                  Here is the compressed file, I reset the Script to the imported version

                  The Scan IN field and the Parse button are the the bottom of the Customer

                  window.  Do not get caught up in the madness.  Save the Bullet incase you need it.

                  • 6. Re: Reading Drivers Lic Mag Stripe

                    There's nothing better than the look of a customized FileMaker's sample solution … not!


                    Anyway, here's a script using your actual field names; unless you changed your setup during the last 45 mins., it will work. If you delete the existing script and paste in the new one, you need to re-assign the button.


                    btw, I originally assumed that you needed this for a batch operation; now I think you'll use it on a user-to-user basis, so I took out the outer loop (customer to customer). If you want it back … well, that's a nice exercise


                    Have fun!


                    • 7. Re: Reading Drivers Lic Mag Stripe

                      Thank you a ton, I will get it moved into the app tomorrow.