Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Separation Model: duplicate relationships?


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

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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!

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