Search code examples
lotus-notesxpageslotus

Handling many-to-many relationships in XPages/Lotus


I have two forms, Company and Client. A company can have any number of clients, and a client can be a client of any number of companies. I want to be able to do things like list a given company's clients, or list the companies that a given client employs. What is the best way to deal with this using the Domino database structure?


Solution

  • That's no problem.

    Create categorized views for companies and for clients. Then, store the company names on each client document and client names on each company document. Use a single-category embedded view to list them on each form. Clicking on the name in the embedded view opens the document.

    Or, create a third form type for company-client relationships and use that to populate the embedded view.