1 Reply Latest reply on Sep 22, 2014 7:35 PM by philmodjunk

    new to filemaker

    TimAshton

      Title

      new to filemaker

      Post

      hi, im still quite new and have tried a few different things but cant get this to work.

      what I have at the moment is a table of customers and a table of people.  1 customer can have multiple people but only 1 of them is a primary contact.  what i want on my main layout is for a cell to show me who the current primary contact is.

      i was able to get it to show me who the primary contact is using conditional formatting but if i change the primary person it doesnt update.

        • 1. Re: new to filemaker
          philmodjunk

          1 customer can have multiple people

          That suggests that you have this one to many relationship (though your field names may be different):

          Customer::__pkCustomerID = People::_fkCustomerID

          but only 1 of them is a primary contact. 

          Which would indicate that you also need a one to one relationship between Customer and the record selected as the Primary contact. In order to have two different relationships between the same two tables, you need to add a Tutorial: What are Table Occurrences? of one of the tables in Manage | Database | Relationships. Go to that tab in Manage Database, select People and use the duplicate button (Two plus signs) to make a copy of the People table occurrence. If needed, add a primary key field to People over on the Fields tab so that you can then set up this relationship:

          Customer::_fkPrimaryContact = People|primary::__pkPeopleID

          For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

          _fkPrimaryContact can be formatted as a drop down list or pop up menu of people ID's and names. This can be a conditional value list of just those People records linked to Customer by the original relationship. Or you can set up a portal to People and put a button in the portal row for selecting one one of the listed People records as the primary. The button would set _fkPrimaryContact to the __pkPeopleID field of the clicked portal row.

          That's  a lot to work through for someone new to FileMaker and databases so feel free to ask follow up questions where needed.