1 2 3 4 Previous Next 50 Replies Latest reply on Dec 8, 2010 1:32 PM by rjlevesque

    How do I pass data from a field into a new record each time data is entered?

    JamesClark

      Title

      How do I pass data from a field into a new record each time data is entered?

      Post

      I'm new to using filemaker and I've started off with a project of building a database of equipment used by the production company I'm working for, as of today I have it doing pretty much everything I want it to do, it presents information about pieces of equipment and also how many of a given asset is currently in stock or in use it also records the date of the last time someone borrowed a piece of equipment and the date when the last person returned a piece of equipment.

      What I'd like to do next is to have a person accessing the database enter their name every time they borrow a piece of equipment and to have that name and the recorded date be added to a list of separate occasions when the equipment was borrowed, how much of it and by whom. This way the database as it currently stands can give the basic information of when something was last borrowed and last returned but also if need be one can look at a more detailed and comprehensive list with details of all the previous borrowing. This will also be necessary as we have several of certain pieces of equipment so if someone were to borrow say 2 out of 6 of one of them and then later another user borrows 1 the database will currently only display the date borrowed for the latest occasion where something was borrowed. This is okay but I want to be able to build this more detailed list so that if one needs to, they can track where the other two are and how long they've been gone.

      Can anyone tell me how I would go about setting this up? Do need to create a record for each occasion of borrowing? Or is there some way to set up a record which is just a list of multiple data entries for each time something was borrowed? Which would be best?

        • 1. Re: How do I pass data from a field into a new record each time data is entered?
          rjlevesque

          FMP has full ability to setup and use accounts. If you want people to be held accountable for equipment they borrow and use then I would setup user accounts. Or in a mass system perhaps just an additional field for the borrower to type in their name and email. It all depends on how involved you need the software to be.

          If everyone utilizes the guest account and puts their name and email into the added field you would have the info you need. However, this would be on the honor system for people to enter their name and email address.

          OTHERWISE

          • If you setup accounts...
          • each person has a login and password
          • you can track date, time, and who logged in
          • user accounts can hold any personal contact info you like

          NOTE: You may want to add an internal condition section also since this is a solution for loaning out equipment. So that way if "JOE" borrows the Widget1 and it is dented, we can see who had it last before it was damaged and hold that person accountable for repairs, replacement, etc.

          • 2. Re: How do I pass data from a field into a new record each time data is entered?
            rjlevesque

            Almost forgot - as for passing data the most common way to pass data around forms and such whether it be PHP, C++, Java, or everyone's favorite FileMaker Pro...programming languages and model developers use variables.

            Example:

            You get the color of a widget typed into "field 1". Using a script you set the value of "field 1" to a global variable. Then you can use this variable elsewhere in your solution. You may want to read up on FMP Variables, they are very handy to use and there is a difference between a "$variable" and a "$$variable".

            http://help.filemaker.com/app/answers/detail/a_id/3604/kw/variables

            http://help.filemaker.com/app/answers/detail/a_id/5530/kw/variables

            (NOTE: and notice a difference between global fields and global variables)

            • 3. Re: How do I pass data from a field into a new record each time data is entered?
              JamesClark

              Well it's a very small company and I'm a total beginner user of filemaker so I figured I would try to avoid the complication of user accounts if possible. I don't mind that it's the honour system because it's most likely to be trusted members of staff borrowing equipment and are unlikely to steal any of it. That said if user accounts make things simpler I'll go for that option.

              1. The important thing is that I want the database to be used thusly: a production begins, someone needs to borrow some equipment. They search the database through either precise searching or by the various category fields I've created. They find what they want and click the borrow button which adds 1 to however many are being borrowed, subtracts one from how many are remaining and adds the date to the in use from field.

              2. They then enter their name and the data from the fields describing what the piece of equipment is, the number being borrowed, the date and the loanee's name is all sent to the relevant fields in a list of users thus allowing us to check either a name and the information regarding their borrowing, OR a piece of equipment linking to all the loanees currently borrowing any or all of those piece of equipment

              At present the first requirement has been met and my database does all those things, it's just two that I'd like to achieve still.

              • 4. Re: How do I pass data from a field into a new record each time data is entered?
                rjlevesque

                Ok, then what exactly do you need it to do now that it isn't doing yet? You need to be able to bring up a list of loanees?

                • 5. Re: How do I pass data from a field into a new record each time data is entered?
                  JamesClark

                  Well the architecture and framework for a list of loanees, each loanee having the data I mentioned attached to their name, is something I'm unsure of. Is this best done as a separate filemaker pro database and somehow linked to the original, or should I make a table with all the users in it?

                  Also I'm not sure how to make this data go to these users' records and maintain a history. So, if User A borrows camera B on the 5th of November, but also borrows microphone A on the 6th, I want the previous occasion's borrowing to be recorded and remain on this user's record and have the new borrowing from the 6th be just another instance of borrowing rather than simply replacing the fields regarding what's been borrowed by this user with the latest borrowing.

                  • 6. Re: How do I pass data from a field into a new record each time data is entered?
                    rjlevesque

                    You could use a table, a list, or a portal for the list of loanees, so my question is where do you want to use it and what field names do you want to show?

                    -------- start quote --------

                    Also I'm not sure how to make this data go to these users' records and  maintain a history. So, if User A borrows camera B on the 5th of  November, but also borrows microphone A on the 6th, I want the previous  occasion's borrowing to be recorded and remain on this user's record and  have the new borrowing from the 6th be just another instance of  borrowing rather than simply replacing the fields regarding what's been  borrowed by this user with the latest borrowing.

                    -------- end quote ----------

                    Thus the need for user accounts in my opinion. Each account can hold all the information connected to that account. There are other ways to do this but they will be flawed in ways that could screw up your db. LOL

                    By creating user accounts you know that

                    1. The user WILL spell their name/username correctly each time so that it goes to the correct record history
                    2. You will be able to to easily and accurately track and store all informational data you need.

                    Now here's a thought...

                    What if you create an "Admin" user that creates all "User" accounts. So you create an account for say "<StaffMemberNameHere>" and set it as active (You will need to create a toggle field for account status). Then on the checkout form in your solution have a drop-down menu to display active Users so they can simply select their account name which ties it to their account.

                    If you need a little more help with it (i.e. maybe some of the code structure or methods) just let me know and I will help you best I can :)

                    • 7. Re: How do I pass data from a field into a new record each time data is entered?
                      rjlevesque

                      If you could post a sample of your solution that would help me help you also. Or at least a snippet of what code portion you will need help with.  Laughing

                      http://www.dropbox.com  <--- excellent, easy method for sharing files when you need to and completely FREE  Wink

                      • 8. Re: How do I pass data from a field into a new record each time data is entered?
                        JamesClark

                        As the database contains a list of some of the equipment we have here perhaps it would be safer if I were to just give you the code. Thing is though I'm not sure how to do that, does Filemaker documents and maintain the code generated to produce each database? Is that a file located somewhere?

                        • 9. Re: How do I pass data from a field into a new record each time data is entered?
                          philmodjunk

                          You can print a script to a PDF, then use Acrobat's text tool to copy the text to your clipboard. Click the Word clipboard icon in the tool bar of the text area where you want to post your script and paste your script into there. (Should avoid getting a double spaced script that way.)

                          You can also save a clone of your database (no records in it) and upload the clone. This is an option available to you when you use "save a copy as..."

                          • 10. Re: How do I pass data from a field into a new record each time data is entered?
                            JamesClark

                            Okay I'll go with the clone option as I've not made much use of scripting as yet, only two scripts executed when someone clicks the buttons 'borrow a piece of equipment' or 'return a piece of equipment'. I've set up a dropbox, the details are:

                            email: dropboxforfilemaker@hotmail.co.uk

                            password: filemaker

                            A clone with no records is in there. I hope what I've been trying to do is comprehensible, things might be a bit messy because I'm teaching myself how to use filemaker as I create this database so there may be stuff in there that was set up with an idea in mind and then later abandoned in favour of another idea, but I've tried to keep that sort of thing to a minimum. I think it's a pretty simple and uncomplicated database as it currently stands. Thanks so much.

                            • 11. Re: How do I pass data from a field into a new record each time data is entered?
                              rjlevesque

                              not sure how you want me to get the copy with this info...

                              www.dropbox.com

                              • 12. Re: How do I pass data from a field into a new record each time data is entered?
                                JamesClark

                                So, if you go to www.dropbox.com and enter these details in you should get access to the dropbox in which the filemaker clone file resides. Was this not what you meant when you suggested dropbox?

                                • 13. Re: How do I pass data from a field into a new record each time data is entered?
                                  JamesClark

                                  Incidentally, I've decided to take your advice and go the route of user accounts and have now set up my first. I've allowed it read access and set it to authenticate through filemaker. Now I'm not sure where I should go next with this, I thought perhaps I should try setting up a new layout called the userscreen within which I intend to create fields like lastpieceofequipmentborrowed, and currentloans and of course also the fields from the original layout for from which data will be needed.

                                  Unfortunately I'm not sure if I'm going about this the right way or not. What's needed is for this screen to be accessible by means of the user logging in and deciding to look at their own account information as is presented in this layout, or by a user clicking on the name of a user currently borrowing a piece equipment when viewing that piece of equipment's record or by a user deciding to view the information about a specific user from a list of users. There won't be any need for preventing who can see the previous borrowing of others or anything because we won't need that level of confidentiality it's just for keeping track of things.

                                  • 14. Re: How do I pass data from a field into a new record each time data is entered?
                                    rjlevesque

                                    Grabbing the file now. Just FYI, in the future never give out your dropbox info publicly. There is a public folder used to share files with others publicly inside the dropbox directory, much safer.  =)

                                    1 2 3 4 Previous Next