2 Replies Latest reply on Mar 18, 2009 8:56 PM by shogun

    Help with auto fill

    shogun

      Title

      Help with auto fill

      Post

      Hi - I'm sure this has been answered before but I'm having trouble joining two databases.

       

      I have a Rolodex database that contains vendor information; company name, contact person, phone, etc. and a Purchase Order database.

      From the Purchase Order database when I type in a company name that exists in the Rolodex database I'd like Filemaker to recognize this relationship and autofill the rest of the data [contact person, phone, etc.].

      Please advise on the best way to do this.

      Thank you. -S

       

        • 1. Re: Help with auto fill
          obeechi
            

          You want to choose a vendor from a list, like a drop down list, not simply type it in. When you choose the vendor you want the vendors Unique ID number (unique inside the Vendor table) to be echoed into the Purchase Order table, where the vendor's id will be regarded as foreign (created in another table) and not necessarily unique (since the same vendor can have multiple unique purchase orders, though the purchase orders will each be unique.. ). For this to work the vendor's id is stored in a field in the Purchase Order table that might be labeled as ForeignIDforVendor within the table's Data Structure (in Manage Database), though on your layout you can label it more simply, like just Vendor ID. 

           

          So you have, for example, a relationship of one vendor related to many purchase order records. You would then have to have relationship in your Manage Database that is shows a table occurrence for Vendor, with a relationship line connected to a table occurrence for Purchase Order. The purchase order side connects to the field for the ForeignIDforVendor, while the vendor side connects to the UniqueIDforVendor.

           

          Then, in layout view, when in a layout for Purchase Orders, you have a field on that layout that is the ForeignIDforVendor, and double click on that field, and create a drop down value list that is based on Vendor UniqueID's from the Vendor Table. You can show only the vendor name, yet be stealth, store the vendor's unique ID in the field for ForeignIDforVendor.  

           

          Eventually you should learn how to have two fields on top of each other where you can have the ForeignID field in the background, while a related field for Vendor's name is in the foreground (but is not editable or enterable -- so when you click, your click goes past it, and into the field in the background, where the relationship is then created, and then you can see the result of this relationship with the vendor's name displayed in the foreground, while the ForeignID field is cloaked and in the background, waiting for you to click into again if your wish). 

          • 2. Re: Help with auto fill
            shogun
              

            obeechi- Thanks for the response.  

            Is there not a simpler way to set this up?  In the purchase order database I don't necessary want a drop down menu that relates to the Rolodex database, what if I'm filling out a PO for a vendor that is not yet in the Rolodex.  

            Is there not a way to script this whereby if the company name matches exactly then the rest of the contact information is filled out? 

            -S