Problem of setting time in portal row
I am using Filemaker Pro 11 Advance working in windows xp, I am developing a simple database for the school entrance system. I have two tables : student and Transaction tables, Layout is also Student and Transaction layout by name.
Student table contain: Student information such as: StudentNumber, Name, LastName picture etc..Transaction table contain portal field such as TimeStart and TimeEnd which is shown in the Student table.
Relationship is Student::StudentID = Transaction::StudentID, Allow creation of record in this table via relationship=enable
Let's say I have 3 students in my database and every time they enter their student number in the Student Number field, automatically set the time in the TimeStart field of the portal (first row), then second enter of that student number script will find that record and set the time in the TimeEnd field of the portal (first row). Below is the flowchart but I am not sure if that's right.
I am new in scripting at the moment, can anyone help me do the script?
Thanks Filemaker Team