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.

How do I select a record to relate in a portal?

Featured Replies

  • Newbies

I have two tables in a one-to-many relationship. I'm showing the "one" in a layout with a portal for the "many". The "many" table is already populated. I don't want to add records in that table. I just want to select one of the already-existing records to relate to the "one" record I'm currently viewing.

I'm hoping someone here can give me a clue as to what approach to take. I'm not making any progress with my experiments so far.

Create a global field and a relationship from this global to the serial field in your second table. Put a button in the portal attached to a Set Field [thistable::global; relatedtable::serial]. Now you can use the recently created relationship to reference the selected related record.

Each record in the "many" table must have a field (remote key) that stores data that uniquely identifies one record in the "one" table. It sounds like you are doing some data migration: you're going to have to more-or-less match them up by hand if necessary, but hopefully the record will alredy have some such unique identifier.

The best way to create related records is to allow the relationship to create related records, then just type data into the blank row on the bottom of the portal. FMP will automatically insert the appropriate remote key data into the related records for you.

  • Author
  • Newbies

Each record in the "many" table must have a field (remote key) that stores data that uniquely identifies one record in the "one" table.

I already have that. I'm sorry if I left out that detail.

The best way to create related records is to allow the relationship to create related records, then just type data into the blank row on the bottom of the portal. FMP will automatically insert the appropriate remote key data into the related records for you.

Aha! That made me flash on what my problem really is: I need to create the records in the "many" table before I know which record in the "one" table they will eventually relate to. That's not the normal order of things so I don't get to use the normal tools.

Thanks. I think that should help me figure this out.

Good call, Vaughan. I read it to mean there were already related records, but one was to be selected specifically, to show more information from that particular record. I would never have interpreted it to mean they weren't already related and the desire was to relate them.

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.