1 2 Previous Next 17 Replies Latest reply on Jul 9, 2009 7:31 AM by craig5005

    Barcodes, Scanners, and Inventory

    WillGonz

      Title

      Barcodes, Scanners, and Inventory

      Post

      I am doing an inventory of items in a store room.  The items have barcodes and I have a barcode scanner.  My items in the inventory have a barcode number, Item name, and amount in stock.

      When someone takes an item from the store room they will need to scan the barcode. Once they scan the barcode it will decrease the current count by 1. I would like a script to just run on a simple layout that just says something like "Scan Out Each Item!" then wait for an item number.  When they scan the item maybe the item shows the name and other information, and decreases the inventory count.  They would continue scanning items and doing this all without having to go to the computer.  

       

      How could I do this?

       

      Thanks,

      WillGonz 

        • 1. Re: Barcodes, Scanners, and Inventory
          philmodjunk
            

          Are you using filemaker pro 10? If so script triggers will do exactly what you want. You should be able to program your bar code scanner to add a "post amble" to the scanned data from the bar code. Your owner's manual probably lists several special bar codes for programming your scanner. Use them to add a "tab" or "enter key" post-amble and you can set up your triggered script to execute when the field is exited in order to process the scanned data from the bar code.

           

          If you are using FMP 9 or older, Set up a script to run in a loop with a Pause step in it. Put your code to process the scanned data after the pause. Program your scanner to have a "return key" post-amble to automatically continue the script after each scan.

          • 2. Re: Barcodes, Scanners, and Inventory
            WillGonz
              

            I am using FileMaker Pro 10. When I scan how do I prevent it from modifying the data?  How could I put in a blank field that goes nowhere and is used just to hold the data from the scanner?

             

            Thanks 

            • 3. Re: Barcodes, Scanners, and Inventory
              etripoli
                 Another suggestion: Create a table that keeps track of each time a barcode is scanned, by creating a records when an item is scanned, automatically enter a value of 1, and have a calculation in your current table that subtracts the total records in the scan table from the original (starting) inventory count.
              • 4. Re: Barcodes, Scanners, and Inventory
                philmodjunk
                  

                WillGonz wrote:

                I am using FileMaker Pro 10. When I scan how do I prevent it from modifying the data?  How could I put in a blank field that goes nowhere and is used just to hold the data from the scanner?

                 

                Thanks 


                 

                The way I did this was to define a global field and place it on a layout designed for using the scanner.

                 

                The script then:

                 

                Parsed the bar code data into the necessary fields in the appropriate records. (a series of set field steps)

                Cleared the global field so that it was ready for the next scan. (Set Field [table:gScanField; "" ])


                • 5. Re: Barcodes, Scanners, and Inventory
                  WillGonz
                    

                  Here is what I came up with:

                  Enter Find Mode [  ] 

                  Set Field [ Inventory::k_ID_Inventory; Inventory::BarCodeOut ] 

                  Perform Find [  ] 

                  If [ Get(FoundCount)>0 ] 

                  Go to Record/Request/Page 

                  [ First ] 

                  Loop 

                  Set Variable [ $CurrentCount; Value:Inventory::Amount_In_Stock ] 

                  Insert Calculated Result [ Inventory::Amount_In_Stock; ($currentcount-1) ] 

                  [ Select ] 

                  Go to Record/Request/Page 

                  [ Next; Exit after last ] 

                  End Loop 

                  End If 

                  Show Custom Dialog [ Message: (Inventory::BarCodeOut)   &  (Inventory::k_ID_Inventory); Buttons: “OK”, “Cancel” ] 

                   

                  The Show Custom Dialog step is just for debugging.  However for some reason the find isn't working right.  I want to take the Data from ::BarCodeOut and put it into the search so it brings up the item that was scanned.  If I manually put the the number in it works just fine. 

                  • 6. Re: Barcodes, Scanners, and Inventory
                    philmodjunk
                      

                    Your script will work as written only if Barcode out is a global field.

                     

                    Either make your field global or modify the script to use a variable:

                     

                    Set Variable [$BarCode, Inventory::BarCodeOut ]

                    Enter Find Mode [  ] 

                    Set Field [ Inventory::k_ID_Inventory; $BarCode] 

                    Perform Find [  ] 

                    • 7. Re: Barcodes, Scanners, and Inventory
                      WillGonz
                        

                      Thanks

                       

                      How do I set it to Global?

                      • 8. Re: Barcodes, Scanners, and Inventory
                        WillGonz
                          

                        Never Mind.  I figured it out.

                         

                        Ok another question.  My BarCode field the one I just set to Global.  Whenever I set the value to null it acts like a value and goes in a loop because of my Script Trigger.  How do I get around this?

                         

                        Thanks Again

                         

                         

                        • 9. Re: Barcodes, Scanners, and Inventory
                          philmodjunk
                            

                          How are you setting it to null?

                           

                          Set FIeld [global field, ""]

                           

                          Shouldn't trigger the script.

                           

                          If you clear it manually, You can add an if step at the start of your triggered script:

                           

                          If [IsEmpty(globalfield)]

                            exit script []

                          end if

                          • 10. Re: Barcodes, Scanners, and Inventory
                            WillGonz
                              

                            So when I try with a number not in the record I get an error to modify the search.  Is there a way to not display an error?

                             

                            Thanks

                             

                            • 11. Re: Barcodes, Scanners, and Inventory
                              WillGonz
                                

                              Figured it out.  I need to turn on Error Capture.

                               

                              • 12. Re: Barcodes, Scanners, and Inventory
                                craig5005
                                  

                                If you want, you can have a custom message pop up when an error occurs.  Just include an if statement in your script that checks the last error.

                                 

                                If [Get(LastError)="401"]

                                Show custom dialog ["No product found"; "No product was found with this barcode number."]

                                End If

                                 

                                The 401 is the error code for not finding any records. 

                                • 13. Re: Barcodes, Scanners, and Inventory
                                  WillGonz
                                    

                                  Thanks worked like a charm.

                                   

                                  So now I am setting up users.  I want some users to only have access to the area for scanning items out of the inventory.  I have set up the access rights and it works great.  But I want some users to start with a different layout.  Is there a setting for this?

                                   

                                  Thanks 

                                  • 14. Re: Barcodes, Scanners, and Inventory
                                    craig5005
                                      

                                    In your open script, create If statements as well.

                                     

                                    Like

                                    If [Get(username)="bob"] or [Get(username)="joe"]........

                                    Go to layout="layout 1"

                                    Else

                                    Go to layout="layout 2"

                                    end if

                                    1 2 Previous Next