January 8, 201313 yr I have a many to many relationship between my Jobs table and my Contacts table. I have created a tabled called Jobs_Contacts that looks like this: ID (numerical, serial) JOB ID (foreign key to Jobs table) CONTACT ID (foreign key to a Jobs_Contacts_TO, this is a table occurrence of my Contacts table) Relationship (Text) This table (Jobs_Contacts) is being represented by a portal on a layout tied to my Jobs table. This portal displays the following fields: Relationship Jobs_Contacts_TO:Full Name Jobs_Contacts_TO:Work Number ... What I would like to happen is to display the list of all names in the database in the field control within the portal for Jobs_Contacts_TO:Full Name; and when a name is selected, it should set the Jobs_Contacts to the ID of that record in the Jobs_Contacts_TO. I should also mention that Jobs_Contacts_TO:Full Name is a calculated field. (Essentially First Name & Last Name). Is what I am wanting possible? Thanks! Ryan
January 8, 201313 yr There is an inherent problem with your approach if two people share the same first and last name. What you probably want to do is is show a modal window list showing all names, with one or two additional pieces of information as extra identifier (address, DOB,...) and when the user clicks a name on the list you capture the ID of that contact, close the modal window and set the ID in your join table
January 8, 201313 yr What happens to your ID if a person changes their name, i.e. gets married? If you change the name, you lose the related data.
January 8, 201313 yr Author Both good points. Can you do modal dialogs on the iPad? This particular layout is being designed for it. I am really trying to avoid multiple layouts, hence my use of the portal. If a person changes their name, the ID won't change. We would just go into the Contacts layout and change their Last Name and Full Name fields appropriately. The ID stays the same. As for duplicates, that is indeed a problem. I'll solve that later. LOL
January 8, 201313 yr I should also mention that Jobs_Contacts_TO:Full Name is a calculated field. (Essentially First Name & Last Name). If a person changes their name, the ID won't change. We would just go into the Contacts layout and change their Last Name and Full Name fields appropriately. The ID stays the same. How would that be possible?
January 8, 201313 yr Author Actually, Lee... I just tested it. If I change the Last Name, the Full Name changes automajically. That is not my problem... my problem is getting my child table to get set to the right field when the user selects a Contact in the portal.
January 8, 201313 yr Attach a copy of your file. Remove any confidential information before you post it. To attach a file, follow these steps. Zip the file first.Use the More Reply Option Click on Choose Files (this will take you to your hard drive). Find your file and choose it. Click Attach This File. Click Add Reply. If you have a problem let us know
January 9, 201313 yr Solution my problem is getting my child table to get set to the right field when the user selects a Contact in the portal. I am having a hard time understanding what you describe. Did you perhaps mean something like: http://fmforums.com/forum/showpost.php?post/355429/
January 10, 201313 yr Author Why yes, that is exactly what I am trying to do! I will study your db a little further.
Create an account or sign in to comment