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.

relate two tables...

Featured Replies

In my head this seems easy... however once I sit down to make it work... I can't, then again, I'm a newbie!

I have a Contact Management database that I have created. Recently I added the mail.it plugin. I now have two tables with very similar fields. Because both tables are referenced in quite alot of different scripts and layouts I want to avoid deleting one or the other, instead (I think) I want to create a relationship between the two.

Both tables store contact info, but with different field names. They both have First Name, Last Name, Address, Email address etc. Both have a Client ID field which is where I think the relationship would be created.

How do I auto-populate the details in one table if I add a new contact in the other table? Presumably I need some sort of script that is trigged when a new record is added, but it would also need to work if I imported data.

Any help is greatly appreciated!

Hi,

You are correct in that you want to use the Client Id field for your relationship. The fields you want to auto populate will need to be changed to be a lookup based on the relationship you set up. See the attached it should get you headed in the right direction.

Michael

Lookup.zip

  • Author

Thanks for the prompt response AudioFreak!

I have set all of the fields in Contact (except ID) to lookup, and entered a new contact on the original table, but it hasn't appeared on the Contact table!

I have set the relationship as "=" with create and delete records set to on, and each field has indexing turned off (in the "lookup" table)

Am I missing something?

No need to have create and delete turned on. When you enter the Contact Id is when the lookup fields should populate.

If you can could you post a copy of your file to take a look at?

Michael

  • Author

Hmm, tried to upload the file but keep getting an error message saying my permission level does not allow it, or something... any suggestions?

Make sure the file is zipped. You can't upload a FP7 file directly. The file types accepted are:

zip, txt, pdf, bmp, gif, jpg, png, sit, and mov.

That would be my guess as to why you are getting an error.

  • Author

I think I've worked out why I can't upload, it says the maximum file size is 1.5mb, and my file is 24.5 mb I could email it to you if that would help!

You might be able to reduce the size by saving as a No Record Clone, and the making a zip file out of it.

Lee

  • Author

Unfortunately, even a zipped up No Record Clone is still 5.3 mb My DB must be a lumbering thing with too much junk!! If you have any other ideas, I'd be happy to hear them!

If you like go ahead and email it to me, and I will take a look.

Michael

  • Author

Ok, I think I have a solution! Click on the link below and the file is available there for download. It is the only file on the site, but to avoid any confusion, it is called CMDB.fp7.zip.

The two tables that are of concern are Client Info and Contacts. Basically if you add a record in the Client Info table, it should automatically update the Contact table.

Thanks for your time and advice!

http://homepage.mac.com/duncsandbecks/FileSharing10.html

Ok took a look at what you have. You have quite a bit going on and you appear to have some work behind and ahead of you.

Your relationship seems ok but I would not have the delete records set up on both sides of the relationship.

If you put the related fields in a portal on the layout you have named "Database" and create the records from that portal all should be good.

I tried stripping the file down so I could add it here but it's still too big. If you want I can email it to you.

Michael

  • Author

Thanks Michael, as I said, its a bit of a mess!

I'll try setting up the portals and see if that works.

Here is a new file using your layouts. I removed all that really wasn't needed to help you along with this.

Michael

DisplayRelated.zip

  • Author

Wow thanks Michael, you really have gone above and beyond - I shall let you know how it goes.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.