9 Replies Latest reply on Nov 8, 2012 1:23 PM by philmodjunk

    Auto Fill



      Auto Fill


            I am trying to create a script to add new records, and once I select, say, the name of the person, I want it to auto fill the rest of their info - like address, city, state, zip, etc.  I am at a point where I can create a new record and go to the field to select the person's name, but I do not know how to get the rest of the information automatically filled in.  I am using FMP 11 Advanced.  Thanks for the help!

        • 1. Re: Auto Fill
          •           posted December 23, 2010 by PhilModJunk
            •                     Auto Fill                     
              •                               Report Abuse
          •           Permalink

               Presumably, you have two tables, Main--the table where you want your auto-fill and Contacts--the table from which you want to access the contact information.

               While it is possible to link these two tables by name, names are not unique, subject to being changed and can create issues when you discover you've entered a name incorrectly and then need to correct it. If you base your relationship on an auto-entered serial number, you can avoid these issues.

               Main needs at least one field for this, ContactID, more may be needed depending on what results you want from your auto-fill.

               In contacts you would have:

               ContactID (an auto-entered serial number)
               plus your name and address fields.

               You'd then relate the two tables in Manage | Database | Relationships like this:

               Main::ContactID = Contacts::ContactID

               Format Main::ContactID on your Main layout as a value list that lists contact ID's from Contacts and at least a combined name from Contacts--though you may want to define a calculation field in contacts that combines it with an address or phone number field to help distiguish between two contacts that have the same name. With this value list, you can see the contact's current name, but selecting a value enters the Contact ID.

               What you do next depends on the results you want for your auto-fill.

          1.           You can set this up so that the data that auto-fills automatically updates every time you edit the matching record in the contacts table.
          3.           You can also set this up so that the information currently in contacts is physically copied to fields in Main. This copied data will not automatically update when you edit data in the Contacts table so you get a "snapshot" of the data current at the time you selected this contact in a given record. This second option is often used in invoices so that you can see what contact info was current at the time the invoice was completed rather than the contact info currently stored in the contacts table.


               If you choose option 1, the implementation is simple. In addition to your Main::ContactID field, you simply add the name and address fields from Contacts to your Main layout. When you select a Contact in Main::ContactID, the info from the matching Contacts record will automatically appear.

               If you choose option 2, you'll need to define matching fields in Main and set each to use the Looked Up Value option to copy data from the corresponding field in Contacts.

          • 2. Re: Auto Fill

                 I have one table consisting of around 900 records for different customers, when I add a new record for a different product for one of the existing customers, I would like to auto fill fields such as contact name, tel no, mobile etc when I select a customer from the existing list/records.

                 Please help!!!

            • 3. Re: Auto Fill

                   A database can have many tables, tables are meant to hold objects - customers in one table, products in another, if a customer can have more than one order, that means there should be a table for orders.  If an order can have more than one product, that means you have a table for orderlines (each line has one product).

                   The first five links in this list would be useful for you to read.


              • 4. Re: Auto Fill

                     You found and quoted from a thread where I've helped others with this issue, but you don't indicate where this fails to help you. Thus, I am unsure what additional info you need in order to make this work for you.

                • 5. Re: Auto Fill

                       Thanks Phil, you kindly gave me advise based on having 2 tables, however i only have one table. My records will work better for me if i have only one table rather than multiple tables. Are you able to assist with such a senario pls?



                  • 6. Re: Auto Fill

                         That like saying my car will work better with two tires, instead of four.   Phil is an expert with filemaker, why ask questions if your not going to take

                         his advise.  I'm not trying to be rude, but trying to make a point.  Your application will work better by following the advice giving by either person

                         that has  commented.  You will not regret making the additional changes and will be worth your time.  

                         You can make backup copies of your current databases.  Work on the changes and after completed import your data into the new database. 

                         You would have your working copy, daily backup copy, and a backup copy to make changes to.  I know there are several people on this forum that  

                         will be willing to help you with all your questions.  Phil and David answer question daily on here.  They enjoy working with filemaker and helping

                         people as much as I do.  Just trust the advice and Good Luck with whatever you decide to do. yes

                    • 7. Re: Auto Fill

                           Thanks S Chamblee, I hope you could tell that i am a novice in this, i was not in anyway suggesting that Phil hadn't given me the right advise, Apologies if it can over that way. Phil has helped me a lot too. I appreciate his advice always. In fact, the request was actually directed at him knowing that he is quite knowledgeable. I have only been using filemaker for 2 weeks or so. I believe its going to help our organisation a great deal. I'm here to learn.

                           I appreciate your help Phil and as always thank you so much!!! Keep up the good work.

                      • 8. Re: Auto Fill

                             Hi, I have just created 3 tables, the first one containing Customer details,second Product details, and so on?

                             Is it possible to have all 3 tables displayed on the same screen, side by side?  Currently, i can only view them individually from the drop down menu


                        • 9. Re: Auto Fill

                               Lets' back up a bit here.

                               Can you provide a brief overview of your database design? At least how you need it to work?

                               Relationships can definitely pull data from the same table or different tables--so one question is whether or not you need two (or more) tables and another is in what relationship will best serve to provide the link you need to pull up that data.

                               Then it's a question of whether this should copy the data over or just display it from the other table. each approach requires the same relationship, but has different consequences for you when data in the source table is modified at a later date.