1 Reply Latest reply on Feb 28, 2011 11:27 AM by philmodjunk

    initial creation of key field in child from parent key

    cowtrax

      Title

      initial creation of key field in child from parent key

      Post

      i have a "child" table in which i want the key to be automatically set up from the parent record that is currently active.  So the user either selects an existing record or creates a new master record in the master table.  After that record is chosen, the primary key needs to automatically be put into the "child" file foreign key.  I am new and not sure how to hold the data to pass it along.  any help would be appreciated.

      thanks.

      mike

        • 1. Re: initial creation of key field in child from parent key
          philmodjunk

          This is easy to set up if you are using a portal for this. Please look up portal in FileMaker help to find more background info on this very useful layout object.

          If you have this relationship: Parent::PrimaryKey = Child::ForeignKey

          In Manage | Database | Relationships, you can double click the line linking these two table occurrence "boxes" and enable "Allow creation of records via this relationship." for the Child table. Then you can simply start entering data into the bottom blank row of a portal to Child placed on the Parent layout, and a new record in child will be created with the value of PrimaryKey will automatically be entered in to ForeignKey.