Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Adding record via portal... editing relationships


This topic is 4334 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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

Posted

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?

Posted

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. 

Posted

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

This topic is 4334 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.