Database Reference
In-Depth Information
Figure 4-13. In the window on the left, the Omar Little record is active, and you can see that the
portal shows field boundaries as if there's a new record. But in the window on the right, you can
see that the Payment table doesn't have any records yet. Keep your screen set up like this for the
next tutorials, so you can watch how and when related records are created, edited, and deleted.
This is also a good troubleshooting tip when something is wrong with a relationship and you're try-
ing to figure out how to fix it.
Remember you wouldn't usually put a foreign key field in a portal because as you just saw,
the child record disappears from the portal when you changed the field's value; it's no longer
related to the parent record you're viewing. Plus it's confusing to users, since the value in
every child record is, as it should be, exactly the same. Still, viewing an ID field in a portal,
along with a second window opened to a layout that has the context of the related records, is
a good way to learn how relationships work. Plus it's a great way to troubleshoot when
something is not working the way it should.
Editing Records Through a Portal
You can edit any related record by clicking in the field you want to change and then typing
the new info. Tab to the next row, or if you're on the last row in the portal, click into a blank
space on the Lease Agreement record to commit the changes.
Deleting Records Through a Portal
Unlike the New Record command, the Delete Record command can work on a portal re-
cord—if you've formatted the portal to allow related record deletion (luckily, you did just
that back on Creating a Relationship Between Two Table Occurrences ). But you have to
Search WWH ::




Custom Search