2 Replies Latest reply on Apr 25, 2013 3:10 PM by JohnAnslow

    Creating a Checkout Database

    JohnAnslow

      Title

      Creating a Checkout Database

      Post

           I'm working on putting together an inventory system for our equipment room at the office and I've had a couple snags in my design.

           I've created a Master Inventory database that holds all the necessary data on the equipment, from this database I have a "Checkout" layout that consists of a "Barcode" field which is related to the item barcode found in the inventory list. A script is set up to create a new field once a barcode is scanned to form a list of gear being checked out. Attached to the layout is a button to create a printable report of the checked out items as well as a button to clear the fields to begin a new check out list.

           I'm trying to implement a script to change a status field on the Master Inventory database from "In" to "Out". The problem I'm having with it is that whenever I clear the Checkout layout of it's data it checks all the items back in. I believe this is entirely a relational error or an error in the way I wrote my script. Any ideas how to fix this?

        • 1. Re: Creating a Checkout Database
          philmodjunk

               You'll need to be careful how you use your technical terms to avoid possible confusion:

               

                    I have a "Checkout" layout that consists of a "Barcode" field which is related to the item barcode found in the inventory list.

               This tells me that you have a "checkout" TABLE linked to an Inventory list TABLE by the barcode fields in each table. Layouts and tables are two different things even though they often have identical names.

               

                    A script is set up to create a new field once a barcode is scanned

               That's actually impossible. Scripts cannot create new fields. They can create a new RECORD, and I believe that this is what you are describing.

               

                    The problem I'm having with it is that whenever I clear the Checkout layout of it's data it checks all the items back in.

               And how are you "clearing the layout"?

               I would guess that you are either deleting records or deleting data from fields. Neither sounds like the correct thing to do here. Normally, you would keep your checkout records unmodified until the item thus checked out is checked back in and you'd have a field for when an item is checked in and when it is checked out. With that approach, you'd never need to "clear" any data from your tables after checking stuff in/out.

          • 2. Re: Creating a Checkout Database
            JohnAnslow

                 Thanks so much! Sorry about the terminology confusion, I picked this program up recently and I'm still getting my head around all the proper terms and their relationships to one another. This helps me out alot though, completely changed my thoughts on how to organize this, I should be able to work something out.