1 Reply Latest reply on Dec 18, 2012 8:27 AM by philmodjunk

    Stop duplicate entry of group membership

      Title

      Stop duplicate entry of group membership

      Post

           I have a file that contains the following components:

           * Dealership

           * Locations (many-to-one with Dealership)

           * Employee (many-to-one with Dealership)

           * Group (many-to-one with Dealership)

           The problem is when I am adding groups to user (or visa-versa).  I can add double entries.  I'm sure I can fix this by requiring unique records when the user tries to add an employee to a group of which they are already a member.  But, what I'd prefer to do is not show them any employees that are already a member of the group.

           I'm using a join table to maintain the relationships and employee/group picker views to change group membership.  I'm hoping there is an easy way to make the picker views only show the unique records.  I've attached a picture of the relationships view (seems easier than trying to explain everything).

           Thanks!

      Screen_Shot_2012-12-17_at_8.23.23_PM.png

        • 1. Re: Stop duplicate entry of group membership
          philmodjunk

               You have this many to many relationship:

               Group----<group_EMPLOYEEGROUP>-----group_employeegroup_EMPLOYEE

               I have a demo file built around this relationship

               Contacts-----<Contact_Event>-------Events

               That explores this very issue with three different ways to prevent assigning a given contact to the same event more than once:

          https://www.dropbox.com/s/oyir7cs0yxmbn6i/ManyToManywDemoWExtras.fp7

               It explores using Field Validation, A diminishing value list (what you describe here) and a check box format as ways to keep this data entry error from happening.

               If you are using FileMaker 12, open the demo file from the File menu and FileMaker will produce a new copy converted to the new FileMaker 12 format.