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

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

Recommended Posts

Posted

Hey, hope this is in the right section.

I got 2 tables, Customers and Invoices.. one to many in my situation, customer can have many invoices, one invoice can only belong to one customer..

I`ve already made a primary key in both tables, customers_ID and invoices_ID.

Do i put my foreign key in the "many" side of the relationship?

And also I wonder if a foreign key should be just be a number or should it auto enter serial number 1 to 1 like the primary key fields?

Posted

Techinically you only need the primary key in the Contacts table. Make a Contacts foreign key in Invoices and its all good.

You also need an Invoice primary key, but not for the relationship between contacts and invoices. The Invoices primary key would be used to link the LineItems to Invoices.

  • Like 1
Posted

Hi there,

the foreign key CANNOT be an auto enter serial number, by design.

First of all, without any Filemaker technical considerations, and just out of pure logic :

this foreign key is part of the link between the two tables, but in order to be "automatically entered", the link would somehow have to be already set, just to know which record of the other table it should be linked to...

As we say in french : "that's the snake eating his own tail..."

So you'll have to set this foreign key either manually or by script.

  • Like 1
Posted
This demo might help to show you how relationships are built and how you can create a new invoice from a customer record using a script that populates the foreign key.

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