5 Replies Latest reply on May 29, 2013 5:44 PM by carojo

    How to combine barcode and keyboard data entry?

    carojo

      Hi

       

      I'm developing a FileMaker 12 solution that involves a suite of barcode driven processes, which is stretching my knowledge of script control.

       

      In general the scripts pause whenever user input from the scanner is required. There is a global field that receives the scanned value and the scanner is configured to input a tab and carraige return after the scanned code - so that it automatically tabs to and activates a "Go" button which is set to "Resume Script".

       

      The issue is where I have to allow some keyboard input from the user ie data input is too complex / varied to create as barcodes. Currently the user has to click on a button to resume the script if they are typing into these fields (scanning "Continue" would put the scanned data into the wrong field). This is working ok but not very neat, and the client has asked if it is possible to allow for scanned input to continue to next step which would be more consistent (ie if they are accepting the default value entered for these fields thay can scan "Continue" so long as they haven't entered any of the fields using the mouse).

       

      I've been playing around with using a script attached to a custom menu item (that could be fired from the scanner by configuring a shortcut key) but have not got this to work since

       

      A) Using set field script step to set the scanner input field to "Continue" cannot be acheived in the same way as by the scanner input (where it populates field and enters a tab & carraige return to activate "Resume script" button which is the next tab object)

       

      B) I'm left with the problem that "Resume script" only acts within the subscript being run not the main script that has been paused for user input.

       

      Is there a way to do any of the following that would help me acheive a better user interface (or any other suggestions?)

       

      1. Activate "resume script" for the calling script when subscript exits (eg activate "Coontinue" button)
      2. Detect the device used for user input (keyboard versus scanner)

       

      I do realise that one option is to split my original script into two parts so that instead of resuming the script I am performing part B, but with the amount of looping and user input required for the process I'm hoping there might be a neater solution.

       

      Thanks in advance

       

      Caroline

        • 1. Re: How to combine barcode and keyboard data entry?
          RubenVanDenBoogaard

          Hi Caroline,

           

          I normally use a looping script with a custom dialog with a field to grab the barcode; a carriage return from the scanner will accept the

          dialog and continue with the script.  You can either use the barcode scanner or a keyboard to enter data.

           

          Then use the script to process the barcode.

           

          Hope that helps,

           

          Best regards,

           

          Ruben van den Boogaard

          Infomatics Software

          ruben@infomatics.nl

          1 of 1 people found this helpful
          • 2. Re: How to combine barcode and keyboard data entry?
            carojo

            Thanks Ruben

             

            I can see how that would work, although a pity that dialog windows only allow up to 3 input fields (I require 4) and I don't think the new specify Modal window feature in FM12 can be made to work in the same way as a custom dialog ie having carraige return operate to accept / close the window no matter where the cursor is.

             

            Splitting my input over 2 custom dialogs is a pretty good compromise though - thanks for your assistance.

             

            Caroline

             

            (though just a I'm typing this I'm wondering if an OnObjectKeystroke trigger could detect a carraige return - presumably FileMaker doesn't care whether that is input from a keyboard or scanner?)

            • 3. Re: How to combine barcode and keyboard data entry?
              RubenVanDenBoogaard

              Hi Caroline,

               

              There are several plugin's to create more advanced dialogs with more buttons (I use the 24U Dialog plugin, but there are others)

               

              Best regards,

               

              Ruben van den Boogaard

              Infomatics Software

              ruben@infomatics.nl

              • 4. Re: How to combine barcode and keyboard data entry?
                jbante

                Most barcode scanners look just like a keyboard as far as the computer is concerned. OnObjectKeystroke and OnLayoutKeystroke can definitely detect a carriage return (or an escape), and I've used it several times just for that purpose.

                1 of 1 people found this helpful
                • 5. Re: How to combine barcode and keyboard data entry?
                  carojo

                  Thanks to both of you for the helpful advice. I have found using a Modal window for keyborad entered fields is working ok and the use of Custom Dialogue is a neat way to prevent the user straying away from the barcode scan input field.

                   

                  Before that I'd been testing out using "On Object Exit" trigger on scan input field to prevent exit if the field was empty, but discovered that executing this trigger interfered with the barcode entry - ie barcode is set to input value then tab (to next object which was to button set to Resume Script) then enter to activate the button. However, if the trigger fires following a barcode scan it returns "True" ok but then only tabs to button and does not activate it - the "enter" part seems to get stripped off somehow - I don't think the built in developer tools are able to interrogate exactly what's going on but would be interested to hear from anyone that knows.

                   

                  I should mention that I've inherited a system that's 70% built (my first using barcodes) and that was how they'd configured the scanner and scripting - probably to allow the option of using the keyboard as well - but perhaps it's not the best way!

                   

                  It's bringing back memories of developing Oracle Forms back in the 90s - I seem to remeber even then there was a lot more control of the interface available through triggers but good to see FileMaker is adding more with each version.

                   

                  All the best

                  Caroline