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

Any help on what looks to be a self relationship?


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

Recommended Posts

Posted

I came across a sample contact database that I would love to figure out how to do.

Contacts are entered in one of 2 layouts. One layout for companies, one layout for personal. View database as list view and see all contacts, both company and personal. Simple so far.

Go to a company contact record. There is a window at the bottom that looks to be a portal. you hit a add button and can add personal contacts associated with that particular company. These personal contacts that are listed are not from a related seperate databse. If I view all the records is list mode, I can see the personal contact as each individual records. I am not quite sure how in the same database am I able to go to a record and show a custom list of other related records from the same file.

Any thoughts or pointers in the right direction?

LR

Posted

Self relationships are perfectly OK. If you create a relationship to the same file, use the Company Number field for the left side of the relationship and another field (call it CompanyForPerson) on the right side. You can use a portal to display a list of the individual's records "related" to the company. Read up on relationships, there is plenty in the manual and after market books.

-bd

Posted

It's an simply hierachical structure with relationship "has" and an flag like isPerson with values 1 and 0.

Every records share basically same set of informations (that's why in this case it could be appropriate to use only one file, and reason could bethe FM limit on number of opened files)???

Company has name, person has name

company has address person has adress and so on.

The underneeth relational model is very simple

You have 2 IDs

autoID defined as auto enter serial number as text

parentID defined as text

One bilateral relationship

autoID-->parentID and

paarentID-->autoID

so that you can movearoun in both directions (from company to related contacts and from contact to belonging Company)

Also there could be an Selection relationship based on global field gCompanyOrContact as left key and isPerson as right key.

The rest is easy GTRR show only related and it's done.

HTH

Dj

smirk.gif

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