2 Replies Latest reply on Apr 2, 2012 10:18 AM by edmalloy_1

    Implementing a many-to-many relationship



      Implementing a many-to-many relationship


      Hi all, I'm an experienced SQL database person, but new to filemaker. I am trying to implement a many-to-many relationship. 
      The table incidents holds records about visits of vehicles (cars) to repair facilities (svc_ctrs). 
      The table contains an auto-enter primary key (inc_id) and required FKeys linking to the cars (car_ref -> car_id) and svc_ctrs (svc_ctr_ref -> svc_ctr_id).
      The are 1,000's of both cars and svc_ctrs.

      I begin by finding the svc_ctr and storing its PK (Svc_Ctr_ID) in a global variable: $$Svc_Ctr_Ref.

      I then find the car and store its PK (Car_id) in the global variable: $$Car_Ref.
      I then run a script that Goes to a Layout for an incident and:
      New Record/ Request
      Open Record / Request
      Set Field[Incidents::Svc_Ctr_ref; $$Svc_Ctr_Ref]
      Set Field[Incidents::Car_ref; $$Car_ref]
      Commit Records/Requests[]
      I get an error: "This action cannot be performed because the field is not modifiable."
      However my new record is inserted and committed?
      1) What might be causing the error message:
      2) Is there and easier way to create a many to many record?
      Thanks in advance