(1) The Student ID in the HIstory table should not be an auto-enter serial number, it should be a plain number field.
(2) Delete the Check in and Check out fields from the Student table, you don't need these here, they should only exist in the History table.
(3) Make sure that the portal in the Student table is displaying the Check in and Check out fields from the History table - not the old Check in and Check out fields from the Student table, which should have been deleted in step (2) above anyway.
(4) If you're entering the Check in and Check out data directly into the portal, then open the Edit Relationship dialog and make sure that "Allow creation of records..." is checked under the History table, so that when you enter new Check in and Check out data into the portal it will automatically create a new record in the History table with the correct matching Student ID.
Hope this helps!
Thanks for the quick and a nice response Nick and I followed already your instructions such as removing the auto-enter serial number of the Student ID in the History table and i already deleted the check in and checkout fields from the Student table. I already displayed the check in and checkout fields in the portal under Student table, and in edit relationship dialog I checked already the "Allow creation of records", match Student ID of Student and History table.
My check in and check out fields under History table configuration are almost the same, the type is calculation and the option is unstored = Get (CurrentTime), the check in and check out time in the portal now shows automatically the current system clock time and it's quite good now, but nick please advise me how to do with the check out field to store the time after having the check in time. Is there any other options so that there is an automatic check in and check out time in the portal using ID with barcode in the scanner? Or do i need to have a script for this? Can you please provide us for that script?
I'm glad to hear you sorted out your fields and table relationships :-)
I've never used a barcode scanner with Filemaker, so unfortunately I can't help you with that.
You can search this forum and find several threads on bar codes scanners.
Every barcode scanner I've seen will work in "keyboard emulation mode". That means the data is input to the computer just as though you typed in the data via the keyboard. Thus, you can simply place the cursor in a text field and then use the scanner to scan the barcode's label text into the scanner. ( A barcode is really just a special font that can be read by the scanner rather than a human.)
With filemaker 10 and 11, you can even program most scanners to put a Pre and post amble before and after the scanned data and set up script triggers such as OnKeystroke and/or OnObjectExit to further automate the process.