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

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


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

Recommended Posts

  • Newbies
Posted

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.

Posted

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.

Posted

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.

  • Newbies
Posted

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.

Posted

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.

This topic is 7291 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.