Best thing is not to copy things from one table to another, better to have a relationship between the two tables.
If you really need to copy data from one table to another here is how I would do it
Go to record (first)
Go to layout (Table1)
Set Variable ( $Field1 ; Value1)
Set Variable ( $Field2 ; Value2)
Go to layout (Table2)
Create new record
Set Field ( Field1 ; $Field1)
Set Field ( Field2 ; $Field2)
Go to layout (Table1)
Go to record (next, finish after last)
Read free FileMaker Training Series to learn more about FileMaker
Thank you Johan. I agree with you. the user would like to transfer the data of sibling to a new student so that they don't require to enter the data of his/her family again. Is there any better method i could use instead of writing a script to copy the data?
i am using filemaker 14
Use two tables in a relationship. Put data that will be the same for all siblings in a Family table with one record per table. Put data unique to each sibling in a related table with one record for each family member. Link the two tables by family ID.
Thank you philmodjunk, if the family have more than one sibling, than two siblings for example will have same id, is that ok for database management?
They would have the same FamilyID to link to the same record in the Familly table. They should also have another field with a unique ID that identifies each sibling uniquely.
You mean i create a join table linking up student, parent and sibling?
No, you link the sibling records to the Family table by a FamilyID field that identifies the family. THen another field, SiblingID or some such name would identify each individual sibling.
You would only need a join table if you need to show that a sibling is a member of more than one family. That might be necessary given divorce/remarriage etc. But it isn't needed for what we have discussed to this point.
Thank you. The users would like to see family member of the student so i should create a family table linking student and also sibling table?
Student and sibling would be the same table as far as I can tell from here.
You mean i don't need to create a sibling table? just create a student and family table? and using family id to link up two tables? how could i transfer the data of sibling as a new student?
Keep in mind that i have almost no idea what exactly you are trying to do, but yes each student from the same family would link to the same family record. The idea here is that you would not copy any information from one student record to another. If the information is common to the family, and thus the same for each student, you put that information in the family record. Then, since both students of the same family link to the same family record, this info can be displayed for both students and does not have to be copied nor entered a second time.
Thank you. Actually, i am trying to create a student database to store the information of the student. There is a possibility for their sibling to change to student so i need to find a way to store the whole family information and also able to change the sibling as a new student. so the family information is not required to enter again and the relationship of the whole family could be shown in the layout. Is that clear to all of you?
The change from sibling to student might be just changing the value of a field that has a different value for siblings that are enrolled.
Thank you, changing the value of a field? you mean the id field?
so i need to create a student table and a family table.
For the student table, i should create a id field and family foreign key field and link up to family table.
For the family table, it will store the information of parents and sibling with the family id.
Is that right?