1 Reply Latest reply on Jan 27, 2011 3:46 PM by philmodjunk

    creating drop downs and portals



      creating drop downs and portals


      i have 2 tables: (vendors)  (product)

      In the (product table) i'd like a drop down menu that is based on the field "company name" in the (props table).

      When I create a record in the (product table) and select a company name (based on the records in the vendors table), I'd like to create a relationship between the record I just created and the corresponding record in the (vendor table).

      With that relationship, I'd like to create a portal in the (vendors table) so that I can see a list of records that have the same company name as the records in the (product table).

      How do I do this?


        • 1. Re: creating drop downs and portals

          In the (product table) i'd like a drop down menu that is based on the field "company name" in the (props table).

          "Props table"? Don't you mean the Vendors table?

          Presumably, you want your portal to products on the vendor table to list all the products that vendor can supply?

          If so, use Manage | Database | Relationships to create this relationship:

          Vendors::VendorID = Products::VendorID

          Vendors::VendorID is an auto-entered serial number and Products::VendorID is a number field. (I know you want to match by company name, but bear with me, there's several key reasons to use ID numbers instead of names.)

          Set up your value list for Products::VendorID to list all VendorID's in column 1 and the company name in column 2. When you click in this field you will see the company names listed, but when you select a company, the ID number will be entered. You can place the Company Name field from Vendors on this layout and when you select a vendor, its company name field will appear in that field.

          To get your portal, simply use the portal tool to draw a box on your vendors layout and specify Products in Show Records From.

          You don't want to directly base your relationship on the company name field because you can't be sure that company name fields are unique, and even worse, companies change their names. Such a name change will trap you with a situation where updating the company name breaks the link to all the listed products for that vendor.