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.

Separation Model: duplicate relationships?

Featured Replies

Hi,

I'm creating my first separation model solution with two files, myDB and myDBData.

My question: do I create the relationships in the base data myDBData file as well as the interface/business logic file myDB?

At first glance it would seem redundant to do so, but I'm creating several many-to-many relationships in this solution so I wonder if I shouldn't have the relationships in the data file too.

TIA for any help,

Pat

Relationships in the data file may be needed when a related field is needed in a field definition's calculation, or auto-enter by calculation, or for a Lookup. But not so much for portals, filters, navigation, etc., because those are more about presentation of the data rather than the data itself. Presentation requires a layout with an attachment to a table occurrence of the interface file anyway.

The general rule I think would be: Don't create a relationship in the data file unless you have to. You will generally know that when defining fields.

  • Author

Thanks Fenton - that's really clear.

I'll follow your general rule, remove all the relationships in the data file and put them back only when I come across a requirement.

some other caveats...

Custom functions if used may need replication in both files.

Variables don't work across files. - I had fields using $variables to auto enter data on a field when the record is created but they didn't work when the script is initiated in the interface file. I had to resort to globals and pass the values thru a relationship.

Using "SELF" function in a calculation didn't work when evaluated thru the relationship in the data entry screen of the interface file. - I had to use the actual field instead of Self.

  • Author

Interesting points Stephen.

I suppose if you're moving to SO then the idea is to be more purist (read SQL-esque) and avoid some of the useful stuff in FMP. Not my intention!

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.