It won't happen automatically. FileMaker can't read the user's mind to know to what record in the parent table to link this new child table record.
The fk field can be formatted with a value list for selecting the correct parent record or a script on the parent record's layout can set a global variable or field with the parent key value of the current record and you can define an auto-enter calculation on the child record's fk field to auto-enter the value of that global variable or field.
You can also use a portal on the parent table layout to create related records in the child table. If "allow creation of records via this relationship" is enabled for the child table, you can add new related records in the portal simply by entering data into blank fields in the portal and FileMaker will copy over the matching key value for you.
Thanks PhilModJunk. So lemme get this straight. On the button in my larent table(ptInfo) i'm going to place a script that changes layout to Tx then sets a global variable with the field ptIdNumber value in its ptIdNumber field and sets the field value in the Tx layout ptIdNumber field.
Is that the jist?
But you have it backwards. It has to set a global variable first, then it can change layouts. It has to get this value from the current record on your parent layout.
And this will still not do anything for you unless you define the fk field to auto-enter the value of this global variable.
And the OnRecordLoad script trigger can be set up on the parent record layout to perform a script to set the variable so that the variable is automatically updated each time you change or create a parent record on that layout.
AHHHHHHHHH!!!! This makes sense thanks for your help on this PhilModJunk. :)