8 Replies Latest reply on May 27, 2010 9:22 PM by OptimusPrime

    Creating a button that, when pressed, would duplicate fields I have created and enter new data.

    OptimusPrime

      Title

      Creating a button that, when pressed, would duplicate fields I have created and enter new data.

      Post

      Hello FMPro gurus...

       

      Please help.

       

      I'm very new to FileMaker Pro, I'm using FMPro 11. Mac OSX.

      What I'm trying to ask or achieve is this, I've created a database that has fields.

      Is there a way to create a button that will duplicate fields that I've already created and input new data on them.

      I don't want to duplicate the whole form or all fields, just 3 or 5 fields that would make me enter new data.

       

      For Example, I have an institution called BASKET and I have 3 computers there.

      I have a field for INSTITUTION then fields for COMPUTER MAKE, COMPUTER SERIAL NO. and COMPUTER WARRANTY

      Of course I will create these just once but is there a way that I can create a button that would enable me to duplicate the last 3 fields so that I can just input more and more computers as they grow?

       

      I've Tried bento and bento can display TABLES inside the Form view, I don't think FMPro can. Correct me if I'm mistaken.

       

      Thanks!

        • 1. Re: Creating a button that, when pressed, would duplicate fields I have created and enter new data.
          LaRetta_1

          If you already have fields for COMPUTER MAKE, COMPUTER SERIAL NO. and COMPUTER WARRANTY then you don't need to duplicate the fields.  It might help to understand some FileMaker terminology:

           

          You have a file and this file has tables (not really databases). Your break your data into logical tables, such as Institutions might be in one table and Computers would be in another.  You add fields to your Computers table (serial number, warranty, Institution which owns it etc) and then create a record for each computer.  Does this help?  Ask more questions as needed. :smileyhappy:

          • 2. Re: Creating a button that, when pressed, would duplicate fields I have created and enter new data.
            OptimusPrime

            I guess 'duplicating' is not the proper term to use, I want to display a list of data inside one form view.

            In doing so, i'd like to present it as a table. I'll have a column for COMPUTER MAKE, COMPUTER SERIAL NO. and COMPUTER WARRANTY. If I can display a table inside a form view (if FM can, i guess i just don't know how.)

            Then I'll have a row for the particulars. But all should be displayed inside a form view and not on the table view.

             

            I was going to do an approach of creating more records by just pressing a button and it will create new fields under COMPUTER MAKE, COMPUTER SERIAL NO. and COMPUTER WARRANTY and all being under one INSTITUTION. Then if I make another Institution I can create new records for COMPUTER MAKE, COMPUTER SERIAL NO. and COMPUTER WARRANTY. Displaying a table view inside a form view would be the easiest way. I need the form view so that I can have a presentable view of it when published on IWP.

             

            But if you have another approach for this puzzle please let me know. I'd appreciate it so much!

            • 3. Re: Creating a button that, when pressed, would duplicate fields I have created and enter new data.
              aammondd

              One of the display tools is called a portal it allows you to see records in a table "related" to the current view.

               

              In this case you probably need to break your data into at least 2 tables (Institutions, Computer Assets) In the institutions table you would want to have a unique Institution ID (other than its name) you can create  this by using the auto entry option for a serial number.

              In the computer assets table you will also want a unique asset id  field for each record (again auto entry serial numbers are good for this) 

              The reason you want these fields is they serve as unique key fields that can always  be used to identify an individual record regardless of which edits you may do to  the data later. You will also want in the Computer Assets table a field that is refers to the institution id field. (I would name it fk_InstitutionID fk standing for foriegn key)

               

              You can then create other fields in each table that store the various types of information you want to keep about each individual item

               

              Then in the relationships tab of the design database window you will want to create a relationship linking the institution id in the Institutions table with the foreign key field in the Computer Assets table.

              You can also set the relationship to allow creation of records in the Computer Asset table via this relationship 

               

              YOu can  then put a portal on your layout that displays fields from the Computer Asset Table via this relationship. You can even add data directly into the portal to create new records.

               

              You can place buttons in the portal to create a new portal row delete a portal row or even go to a the related record on a new layout where more information may be entered.

               

              The structure of your data though is the key to good design. I suggest a few minutes of research into relational databases about tables, keys etc.

               

              Filemaker may use different terms on occasion but the concepts are familiar enough to translate once you get them down.

               

              • 4. Re: Creating a button that, when pressed, would duplicate fields I have created and enter new data.
                philmodjunk

                You'll need to learn how to create and use portals. To start, look up "portal" in filemaker help and read up on this feature--you likely will use it a lot withi filemaker databases.

                 

                In your case, you can have a table for institutions and a table for computers.

                On your institutions, layout, you can place a portal to computers and you can see and edit data for all computers that belong to that institution.

                Adding data for a new computer can be as simple as simply entering data in the bottom blank row of the portal (assuming you set things up correctly.)

                 

                Read up on portals and give it a try. If you get stuck, post your questions here and one of us will help you get unstuck.

                • 5. Re: Creating a button that, when pressed, would duplicate fields I have created and enter new data.
                  OptimusPrime

                  Thanks for your reply aammondd. I will try your suggestion.

                  • 6. Re: Creating a button that, when pressed, would duplicate fields I have created and enter new data.
                    OptimusPrime

                    @PhilModJunk - I'll read up on portals. I think this one is the key to what I need. Though a button would be cool but this will do. :)

                    • 7. Re: Creating a button that, when pressed, would duplicate fields I have created and enter new data.
                      philmodjunk

                      You can use a button for this, sometimes it works better even, but usually, you'll find this is unecessary once you have your portal working for you.

                      • 8. Re: Creating a button that, when pressed, would duplicate fields I have created and enter new data.
                        OptimusPrime

                        I'm actually learning and using portals right now. it is very nice. Thanks for the info!