6 Replies Latest reply on Jun 14, 2012 9:16 AM by philmodjunk

    If you scan a product



      If you scan a product


      So i have a database, i want to make my database like a pantry (database). 

      If i sold a product, i want that i can scan that product and that the database look at the product and he scan away, or delete the product that i have scan.

      Is that possible? I personaly think that i have to make a script! 


      help please!

        • 1. Re: If you scan a product

          Yes, this takes scripting and you need to tell us what type of hardware you are going to use to scan the barcodes. Will you scan using a scanner connected to your computer so that you can scan and process one item at a time? A portal scanner that stores the scans for later download? A scanner connected to an iPad or iPhone?

          With the first option, most scanners of that type can function in "keyboard emulation mode" which means the scanned data will appear as plain text on the screen of whatever application has the focus. You can actually open up a wordprocessor, scan an item and see the letters and numbers that make up the barcode appear on the page.

          Thus, you can put the focus in a text field in FileMaker and scan an item to enter the data into that field.

          Then a script can take that scanned data and update your inventory.

          If you can configure your scanner to put special characters at the beginning and end of the scanned data, you can use script triggers such as OnLayoutKeystroke and OnObjectExit to perform scripts to fully automate the process so that all you do is bring up a layout designed for the process and start scanning barcodes.

          • 2. Re: If you scan a product

            So if you see this is my database.

            I have a voyager scanner and he scan the serial numbers. 

            So i want a make a script that if i scan that product again he disappear  from my database no the whole product but one product for one.

            Also i have a in the same database a Iphone & Ipad section.
            I think i have a solution for the scanning(Icody). But here is the same problem i want to scan a product and then i want that he scan that product one for one out my system.

            I have one scanner wired he works with a xp computer in the magazine

            and i have two devices (iphone and ipad) those works on the field( other location).

            • 3. Re: If you scan a product

              So you see here the lay-out options for iphone & ipad.

              • 4. Re: If you scan a product

                I suggest using the FM Go Forum to discuss iCody and other aspects of using FMGO. As I understand it, what I am about to suggest for your other scanner will not work the same way with the iCody scanner connected to an iOS device.

                First, I recommend adding a text field to your database with global storage specified. Scan your data into that field and then use scripts to process the data scanned into this field. This assumes a direct link to your database so that it can process the scans as they happen. You'd need to modify this approach if your scanner stores the scanned items for later download.

                I don't know anyting about the scanner you name (Endeavor), but assuming that you can configure it to put characters at the begining and end of the scanned data...

                Configure it to put characters at the beginning that the user is very unlikely to press on their keyboard, such as "Shift-~".

                Then this script can be used to detect the fact that an item was scanned and put the cursor into the global field so that your scanned data will automatically be entered into it each time that you scan something:

                If [ Get ( TriggerKeystroke ) = "~" and Get ( TriggerModifierKeys ) = 1 ]
                   Go to Field [YourTable::GlobalTextField]
                End IF

                In Layout Setup... use the OnLayoutKeystroke trigger to perform the above script.

                Configure your scanner to put either a tab, return or enter character at the end of the scanned data. Use field behavior to set this global field up so that this same character will exit the field.

                Write this script:

                Enter Find mode [] //clear the pause check box
                Set Field [YourTable::SerialNumber ; YourTable::GlobalTextField // I am assuming that the serial number is what is encoded in the barcode]
                Set Error Capture [on]
                Perform Find []
                If [ Get (FoundCount ) = 1 // a single record was found ]
                    Set Field [YourTable::Qty ; YourTable::Qty - 1 ]
                    Show Custom Dialog ["An error has occurred. Check found set for duplicates. Check bar code data to be sure it was accurately scanned."]
                End IF

                Use the OnObjectExit trigger for the global field to perform this script.

                Note: This is a very simple approach you can use to see if you can get your scanner working with FileMaker. I would suggest that you consider a more sophisticated approach that creates new records in a separate table that record the scanned data and when it was scanned so that you have an ongoing record of the changes to your inventory.

                • 5. Re: If you scan a product

                  Ok i understand that maybe icody is not a good programma, but that is for later.
                  that is not a big deal now.

                  What i will is that what i have say early: you scan a product in fmp  join one each at time.
                  So you have two things SERIAL numbers and product numbers.

                  Serial numbers are for each product the same. But product number is for each product other. 

                  when you have sell that product again you scan that product and he scan it away from your inventory. 

                  Can you explain me please step for step what i must do for configurate that what you say above?
                  so  can i  make that in a demo database? so then i can make mistakes and don't screw the other database.

                  I understand that scriptcodes and i have make the scripts with success but still they dont work. Maybe i have something do wrong?

                  By the way my scanner is a metrologic(voyager) MS9540. He scan the barcodes and all.

                  • 6. Re: If you scan a product

                    I didn't say that icody is not good. Only that scanners used with iOS devices have to be set up and used differently than what I am describing here. You can research this in the FM GO Forum (see tab at top of screen).

                    I'm not sure what "step by step" that you need.

                    If you need help configuring your scanner as I have described, you will need to consult the technical info and possibly the tech support staff for that scanner as each scanner can be different in how you do this.

                    If product number is the field that uniquely identifies what you are scanning in order to update your inventory, then use the field for the product number where my example script refers to the serial number.

                    You may want to do this on a copy of your actual database. As long as you work with a copy, you have the original file to revert to if you mess it up.

                    The scripts will not work unless you have configured your scanner correctly to supply the specified characters at beginning and end of the scan.

                    You can test the second script, however, by keying in the characters represented by your bar code into the global field and then exiting the global field. If that works, then your script and database are set up correctly. If it does not work, you'll need to tell me how it didn't work before I can suggest what change needs to be made in order to get it to work.