13 Replies Latest reply on Aug 5, 2017 10:12 AM by blackcatenterprise

    Check in / check out scrip



      Check in / check out scrip


      I am using the 'Lending Library' template in FM and have been adjusting it to meet our departments requirements. We are an educational facility (Music department) and our store room loans equipment to students and staff.

      I am using the ID automation Native FM barcode generator to asign each item with a barcode using the 'Item' (Item name) feild as its source (ie. a barcode is derived from the name of the item). I have also added a 'search' option in the 'check out' process, as well as an automatic due date. I am very happy with the way this is working, as I can now scan an item's bar code, select 'check out' and search for a 'Contact (Student or Teacher) by scanning the students existing ID card into a search bar.

      However the problem is that you can only check one item out at a time. I was not sure what the best way of setting it up to be able to check out multiple items at a time, as students and teachers will often borrow many items at one time. I am a little stuck as I have only been using FM for a few days now, has anyone got any suggestions to improve the check out process?

        • 1. Re: Check in / check out scrip

          I think basing your barcodes on a serial ID number is likely to work better for you in the long run. Names are not always unique and if a data entry error occurs and it is not discovered immediately, it could result in problems when you correct the name and then your barcodes no longer work. You can set up FileMaker to search for ID's instead of names so this should also work for you.

          It is possible to set up a layout where each time you scan a barcode script triggers kick in and check the item in or out of your library. This, however requires writing some scripts and modifying the design of a layout (possibly adding a new layout). Since you've just started using FM, are you ready to take on a scripting challenge?

          If you search this forum for "barcode", you can find a number of threads where I describe using script triggers to automate the scanning process for barcode, Mag strip, and RF tag scanners.

          • 3. Re: Check in / check out scrip

            Thanks for the reply Phil,

            I like the idea of setting a script trigger to execute the check out process, however as you have stated I am new to filemaker and this process will involve some major modifications, especially in relation to the check out process itself. I would like to give it a try but I think I could be a little out of my depth, do you know anything I could base the script on to start me off in the right direction?

            • 4. Re: Check in / check out scrip

              If I type in "barcode scanner" in to the search the forum box at the top right of this screen. I quickly find multiple posts in this forum about bar code scanners. Many of those from the FM Pro Forum section will include sample scripts showing how this can be done. I'd avoid those from FM Go as scanners attached to iPhones and iPads require a different approach to implement some of the details involved.

              • 5. Re: Check in / check out scrip

                I have been working on my filemaker skills and searching forums for the last two weeks. I have assign serial numbers for each record, a barcode field is derived from this serial number. I have managed to write a basic search script:


                Enter find mode []

                set field [Assets::__keypfieldName; Assets::gBarcode]

                Set error capture [ON]

                Perform find []

                If [Get (Foundcount) = 0]

                Show custom dialog ["Invalid search"; No records match your search"]

                End If


                I have also set up your suggested barcode scanner method of setting script triggers, pre barcode:


                If [Get (triggerKeystroke) = "~" and Get (triggermodifierKeys) = 1

                Go to field [Assets::gBarcode]

                Exit script [Result: False]

                End If


                These seem to be working very well and I have an understanding of what they are doing. I would like to try and improve this search script by being able to scan multiple items for one search, as in scan a number of barcoded items and then perorm a find. I heave read many posts but I have not been able to find anything solid, do you have any suggestions to improve the script?

                • 6. Re: Check in / check out scrip

                  Such could be done by building a list of values in a variable or global field, then looping through them to produce a series of find requests--one for each value in the list before performing the find, but I don't see the advantage to doing so. Why would you want to perform your search in this way?

                  • 8. Re: Check in / check out scrip

                    What would you suggest as a good method of checking out multiple items to a single borrower?

                    • 9. Re: Check in / check out scrip

                      I wouldn't perform any finds for this at all.

                      I'd indentify the borrower (barcode scan an ID card?) and use that info to open a new record for documenting the loan of one or more items to the borrower. Then scanning multiple items would populate a related table of items borrowed. This would create one related record for each item borrowed and would function much like an invoice-line items setup. (Back before script triggers were possible, I once set up such a system for a curriculum library that loaned teaching curriculum out to teachers within a school district.)

                      You'd start a new "loan record" and then just keep scanning until all items for one borrower have been scanned.


                      • 11. Re: Check in / check out scrip

                        Ok i like the suggestion, I am using the lending library starter preset. I think changing the existing 'Process check out' script would be my best option? I am looking at the script but I am not seeing where it is defining what item is being checked out.. I'm thinking thats where I could possibly adjust the script to scan multiple items out. Is there anything existing posts that would help me adjust this script?


                        Sorry about all the questions I appreciate the assistanceSmile

                        • 12. Re: Check in / check out scrip

                          Please don't apologize for asking questions. Asking and answering questions is the reason for this forum's existance. Wink

                          Switch starter solutions for a moment and take a look at the invoice starter solution. Take a look how selecting a producID in the line items portal results in data such as a product description and a price automatically being entered into other fields in the same row. Image a barcode scanner entering the Product ID's instead of the user selecting a product ID from the value list. This is essentially the model I'm working from.

                          In the tables I sketched out in the last post, the script that processes the scanned bar code would create a new record in ItemsBorrowed entering the barcoded ID number into the asset ID field. This triggers looked up value field options on other fields to look up an asset description and any other needed fields from Assets (the number of days an item may be borrowed could be looked up this way if different assets may be borrowed for different lengths of time.)

                          • 13. Re: Check in / check out scrip

                            This is a few years late but I wanted to offer this suggestion to future folks reading this old post looking for ideas with similar situations. I would personally make the persons into accounts. Treating each person as an account, not a person, will more easily allow for checking out several items at a time and less problematic.