Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Adding record via portal... editing relationships

Featured Replies

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

Solved by comment

Go to solution

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

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.

  • 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

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?

  • 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. 

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

  • 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/

  • 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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.