Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Help: auto population of fields between records ?


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

Recommended Posts

Posted

I'm new to relational databases and even newer to FM7, so forgive me if this comes accross as a total newbie question.

Here's the scenario:

Two tables :

1. 'customer_details' (client ID, client name, address, etc.)

2. 'customer_contacts' (client ID, contact type, time & date, details)

It's a one to many relationship. One 'customer_details' record could have many 'customer_contacts' records associated with it.

Both tables have a common field 'client_ID', which is auto-entered by FM in the 'customer_details' table when a new record is created. Once a new customer record is created, there is button on the 'customer_details' form to take the user to the 'customer_contacts' form where they can create a contact record for that customer.

THE PROBLEM: I want to client_ID field in the 'customer_contacts' table to be auto-populated based on the last client record that the user came from ? I have a one-to-many relationship created between the two 'client_ID' fields in both tables but the field is not auto-populating.

Any suggestions for the newbie would be appreciated, Thanks.

Posted

When you set up the relationship you can make it create related records. This is normaly done via a portal. You enter data into the last portal row and it creates the new rerlated record.

When using a button to create the related record this opion is left off and you must set the foreign key via the script. To do this add a global field. Set the global to the value of the primary key. Go to related file and run a script to create a new record and then set the foreign key to the value of the global. Many developers think this is the prefered way to create related records.

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