6 Replies Latest reply on Jun 13, 2013 12:00 PM by patricia

    Creating a check in/out feature

    KrisCirillo

      Title

      Creating a check in/out feature

      Post

           I think this might be fairly easy but I am getting confused on how to set this up. 

           I am using FMP as an inventory database which includes all of our assets as well as users. 

           One of my layouts allow for me to assign a user a device. Basically in the layout I have a dropdown menu that links to another database of all my users, so I can select the user and then refer to that to see who the item is check out to.

           I would like to be able to select the user from the dropdown menue (which I can already do) and then click a button next to the list that will create a new entry with the user, serial number and the date I clicked check in. Additionally, I want to have a second button that is check out. Which would do the same except not create a new entry but instead add to the previously created entry a check out date. Then I would like to have a portal or something created so that I can go and look at an assignment history for that product and see on each line, the user, checkin date and check out date. 

           Hopefully that all made sence.  Any help would be appreciated to get me started.

        • 1. Re: Creating a check in/out feature
          philmodjunk

               What tables, fields, relationships have you set up for this? It's quite possible that your drop down list could be set up in a portal row such that simply selecting user from the value list checks out that item.

          • 2. Re: Creating a check in/out feature
            patricia

                 From reading your post. it sound like you are working in the inventory layout. Assuming that. Maybe the simpliest way is to create a separate table. for Checking in and out. Then create a link to your inventory database with the relationship set to allow creation. Then create a portal on your on you device page. Everytime a device is checked out you enter the information in a row.  A new record is automatically created. You could us a button with a script attached to create the record and fill in data for checking out  and just click a button on the record row to check in.

                 The interesting thing about FileMaker is there is alway more than one way to do something.

                 patricia

            • 3. Re: Creating a check in/out feature
              KrisCirillo

                   Okay, so I almost have this working properly except for one thing. 

                   What I ended up doing was creating a new table called "Assignment History" and created a layout for it

                   In that table I created all the fields I wanted, including serial number, check in date, check out date, and user

                   I made a relationship between this table and my inventory table using an indexed, auto-enter serial that is created each time I create a new record in the inventory table

                   I then created a button with a script called "Check Out". This goes to the new layout, creates a record, autofills in serial number, user (as selected from the drop down menu in the inventory layout) and auto fills in todays date in the check out feild

                   I then created a portal on my inventory layout showing all records for that serial number from the Assignment History table

                   In there I created another button with a script that takes me to the chosen record in the portoal in the Assignment History layout and autofills in todays date in the Check In field, then I can also add some notes if I want.

                   So for so good. All of this is working perfectly except that when I change the user from the drop down menu and then click my check out button, I go to the portal (or the records in "Assignment History") and I notice that it does not keep the previous user's name, it changes all records to the newly assigned users name.

                   Obviously this does not help me keep a good history of assigned users. Any tips as to why the individual records to not keep the user name in tact?

              • 4. Re: Creating a check in/out feature
                KrisCirillo

                     By the way here is a little history about the "Users" values. Perhaps I've had this set up wrong all along. 

                     I havea table called Users

                     In that table I have feilds, User ID (an auto-serial feild), First Name, Last Name and Full Name (which is a calculation combining both first and last name)

                     Back to my inventory table, I also have a field called Users

                     In my layout, I make that User feild a pop up menu that looks for values from the User ID feild and then as a seconday Full Name feild on my User table

                     I notice in my Assignment History table, that if I link the user feild to use the value from my Inventory User feild, I get the user ID

                     However if I set it to use the Full Name value from the User table, then the full name will be applied properly

                     Maybe that will help you understand how I have those feilds set up. thank you again for any help you can provide.

                • 5. Re: Creating a check in/out feature
                  philmodjunk

                       That's all a bit confusing. Why do you have a user ID field in the Inventory table?

                  • 6. Re: Creating a check in/out feature
                    patricia

                         From reading your response. It does sound like your serial numbers are a little funky not sure why If you have a portal with the user showing in the inventory file based the foriegn inventory key created in the users table which equals the inventory key then when you want t go to the user. You click in the portal on users row and get the user id at which point set a global to carry it accross to the users table (create a relationship global =user id but there is no need to go to the the user file for check out. Simply have a check out iin the portal appearing on the inventory layout. Click a button  or the check out field and set the date.

                         patricia