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.

Featured Replies

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?

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.

  • Author

yes but the foreign key, should it be auto enter serial aswell or just a number?

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.

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.

Create an account or sign in to comment

Important Information

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

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.