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.

many to many relationship between 2 occurrences of the same table via a join table

Featured Replies

  • Newbies

At the beginning I had a "customer file" database made up of :
- 1 "CUSTOMER" table (= companies...)
- 1 "CONTACT" table (=people who work there).
- 1 join table " customer contacts " (allowing a relation of several to several between the 2)
- 1 CUSTOMER model with a "contacts" portal (which lists the contacts)
- 1 CONTACT model with an "employers" portal (list of clients to which the contact is linked)
so far nothing very complicated

In the real life of a VSE, 1 contact often comes down to a name + 1 mail + 1 such which "turns" sometimes into 1 professional or private customer but he can also place an order for 1 third party (an association or his wife hairdresser ...). This is usually specified at the time of invoicing.
In short, a client and a contact are very similar (they can both have a name, addresses, e-mails, telephones...) it occurred to me that a single CUSTOMER table that serves both as a contact and a client could do the job.
So I replaced the "CONTACT" table by a second occurrence of the "CUSTOMER" table which I renamed "Contact".

The problem is that the portals of the 2 models no longer work as desired!
I first thought it was a context problem, so I cut the link graph into 2 different parts, which are used by each model, following the anchor/buoy logic :

The "CUSTOMER" model is based on:
- 1 occurrence of the CLIENT table "CUSTOMER_view" (the anchor)
- 1 occurence of the joint table "contacts_of_customers"
- 1 occurrence of the CUSTOMER table "contacts".

The "CONTACT" model is based on :
- 1 occurrence of the CLIENT table "CONTACT_view" (the anchor)
- 1 occurrence of the join table "customers_of_contacts".
- 1 occurence of the CLIENT table "customers"

At this stage the portals of both models are "half working":
- the CUSTOMER model displays the first contact, but not the following ones (?!!!)
- same thing for the CONTACT model who displays the 1st customer to which she is affiliated only

I've already tried a number of things but I'm blocking because I don't understand why it doesn't work!
Please help !
Thanks to the good souls who will enlighten me :)

customers-customers.fmp12

Ideally you are describing the need of a PARTY model approach. 

 

 

 

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.