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.

Use Auto-Enter Serialno or name in relation ?

Featured Replies

I have a general FM relationship question:

I have a one-to-many relationship between my table City (one) and table Contacts (many) so that I can select the city from a drop-down list when entering the address in the Contacts layout.

I need your opinions about if the relationship should be using a Auto-Enter serial no field assigned to each City, or simply the City name ?

I think, in a general view of database relationships (and please correct me if I'm wrong), that it would normally be considered more "efficient" to store in the Contact record the SerialNo field of the City (or any sort of unique and short value allowing to identify a unique record), instead of the full name, in order to set the relationship.

In Filemaker, does this apply ? Does it make a big difference ? Or should I just use the City Name field as the key for the relationship. I'm wondering this about many other relationships (Client -> Contacts), (Company -> SalesPersons), etc.

Thanks for your input.

For me, in the case of a city I would relate on the city name but in the case of a company for instance I would relate on ID.

Why the difference? Because a city is not likely to change it's name whereas a company might well do. That way you can change the company's name and still relate to all it's contacts etc.

It will be interesting to see what others recommend

Phil

Phil--

I'd actually go a different way and relate on an ID field. While it is true a City won't often change its name (although there is the story of the town in New Mexico that changed its name to "Truth or Consequences"...), using an ID gives other benefits. For example, you could change your City table to be a ZIP table; each entry there has City State and ZIP. You put in the ZIP, and the City/State are automatically captured. Users only select one field, cutting down on error.

[As an side, many assume that they can use the Zip code as the unique ID, but there are instances where a Zip code crosses jurisdictions, so you would be well advised to use a serial number anyhow. I live in such a split zip code, and I repeatedly get mail (eventually, that is) that uses the dominant city designation...]

Now, the down side on this is that you end up with a large table of Zip code entries. Really big, if you go wild and get as many states as you can. The upside is that once you set this up, you can use it over and over again.

David

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.