September 18, 200619 yr So I have two tables: -- CONTACTS contact_id contact_name job_title COMPANIES company_id company_name website contact_id -- Here's what I'd like to do. I'd like to create a COMPANY record. Then, when I'm creating a new CONTACT record, I'd like to select from the list of available companies via a drop-down list. Once a company is selected, the field companies_website will display on my contact layout. I'm sure this is really simple – I can do it in HTML & MySQL pretty easily - but I'm not sure how to go about this in FM. Can somebody please help me?
September 18, 200619 yr Well it seems like you would want the CompanyID in Contacts, not the ContactID in Company? Wouldn't you have many Contacts for one Company? Well, the idea is that you can cross-place any related field directly onto your layout and it will display the related information (in this case, Company website). If you truly have many Companies for one Contact, then you may need to sort that relationship (in your graph) so that the first related Company record is the one which contains the website. But it sure feels backwards to me, ie, you probably want to relate CompanyID = CompanyID here, with the CompanyID in the Contact table. Then when you select a Company from drop-down (inserting the CompanyID), it will fill in the website on the Contact layout because the website FIELD is from Companies. :wink2:
Create an account or sign in to comment