6 Replies Latest reply on Dec 13, 2012 11:00 AM by OllySedden

    adding a pre-defined set of fields by pressing a button...

    OllySedden

      Title

      adding a pre-defined set of fields by pressing a button...

      Post

           Heya,

            

           Is there a way of adding a pre defined set of fields by clicking an 'add' button within 1 record.

            

           I.e. If i walk into a room and need to record all the different types of table in there, i would like to press an add button and add the tables height, weight, manufacturer, age, etc.. for each different type of table. So in Room A there may be 5 types of table for which this standard set of data needs to be captured, but in Room B there may only be 1 type in there. So by clicking this 'add' button, it adds a set of fields for me to enter data into... 

            

           Is this possible and can someone help me? i'm really new and have been struggling along for a while self-teaching myself... any help would be really appreciated! :-)

            

           Thanks!

            

           Olly

        • 1. Re: adding a pre-defined set of fields by pressing a button...
          philmodjunk

               You can't click a button and add more fields to a database table, but you can click a button to add a new record to a related table.

               You might have a table named "rooms" and a related table named "Tables". With this relationship:

               Rooms-----<Tables

               Rooms::__pkRoomID = Tables::_fkRoomID

               To understand my notation, see this thread: Common Forum Relationship and Field Notations Explained

               You can put a portal to Tables on your rooms layout and add as many records in Tables as you need to document all the tables in the room. You can either create one record in Tables for each and every table in the room or one record in tables for each type of table in the room--with a quantity field to document the number of such tables found in the room. Either method works and which is best depends on the needs of the user.

               With this setup, you may not even need your button. If you select "allow creation of records via this relationship" for tables in the above relationship, you can add new related tables records just by entering data into the portal.

          • 2. Re: adding a pre-defined set of fields by pressing a button...
            OllySedden

                 Thanks very much for your response!

                  

                 i would like to enter one record for each room in a building detailing aspects such as room dimensions, colour of walls etc... And then use this portal idea to add a new row for each different type of table in the room, with a field for the quantity of each type in the room. However, I would like to add each type of table by selecting it from a drop down list, which draws the names of each type of table from a  linked to an imported excel spreadsheet. - is this possible?

                  

                 your help is very appreciated!

            • 3. Re: adding a pre-defined set of fields by pressing a button...
              philmodjunk

                   Do it all the time. If you think about it, this is very similar to how the invoices starter solution that came with your copy of fileMaker works. WHen you fill out the invoice, you select products from a drop down formatted field in the portal row. This data comes from a related table of products--which is much like your imported table of "table" records.

                   Rooms-----<Room_Table>---------Tables

                   Rooms::__pkRoomID = Room_Table::_fkRoomID
                   Tables::__pkTableID = Room_Table::_fkTableID

                   You can format _fkTableID as a drop down list that uses a value list that refers to _pkTableID for Field 1 and a Name or description field from Tables for field 2. That allows you to select a type of table by name, but the value list enters the ID number.

              • 4. Re: adding a pre-defined set of fields by pressing a button...
                OllySedden

                     Thanks again! Maybe I'll have a look at some of e starter solutions to see if any are worth modifying to suit my needs!

                      

                      By the way; once you have created a button with text on it, how do you change the text? Or do you have to delete it and start over?

                • 5. Re: adding a pre-defined set of fields by pressing a button...
                  philmodjunk

                       Enter layout mode.

                       Click the Text tool (Letter T in status tool bar at top of screen)

                       Click the button.

                  • 6. Re: adding a pre-defined set of fields by pressing a button...
                    OllySedden

                         Haha, thank you for helping me! I know I ask a lot of silly questions but I've managed to make the start of a useful little program with your help! Taks :)