Discussions

Expand all | Collapse all

Multiple same fields containing different information

  • 1.  Multiple same fields containing different information

    Posted 10-27-2017 06:09
    I have an opportunities table, where a person can create a potential opportunity in the business. I also have a customer table (which is connected to a contact table, a customer can have many contacts). 

    The opportunities and customer table has a many to many relationship, an opportunity can have many customers, and a customer can have many opportunities. 

    In my opportunities table, I have been able to input a lookup field which allows the user to select a customer (and then a contact under that customer). 

    However, because an opportunity can have many customers, I will need several lookup customer (and contact) fields. I have replicated the fields, and they seem to work when I am inputting information in to the form, however when I save the opportunity it is displaying all of the customer and contact fields as the same customer and contact. How can I get these lookup fields to save separate data from the customer table?

    Thanks, 
    Rosie


  • 2.  RE: Multiple same fields containing different information

    Posted 10-27-2017 15:15
    You will have to create multiple relationships between Opportunity table and Customer table to save separate data from the customer table.


  • 3.  RE: Multiple same fields containing different information

    Top
    Contributor
    Posted 10-27-2017 15:44
    The preferred method to setting this up would be to have a 3rd table that would represent the Customer / Opportunity combination. This table would be the child to both the Customer and Opportunities tables. The Customer would then have no direct relationship to the Opportunity, and vice versa. Setting it up this way allows you to have an unlimited number of Opportunities related to a Customer and an unlimited number of Customers associated with each Opportunity. Setting up individual relationships for each is not a scalable solution and will end up causing other issues in the long run.


  • 4.  RE: Multiple same fields containing different information

    Silver
    Contributor
    Posted 10-27-2017 17:06
    This is the path. :)