You can do this with a script that I'll post below, but Go To Related record is made for this. You can place a button in your portal row and this step can both switch you to the other layout, bring up all the records listed in the portal and make the record that you clicked in the portal the current record.
Without GTRR, your script would look like this:
Set Variable[$ApptID ; Value: Appointments::ApptID]
Go To Layout [Appointments]
Enter Find Mode
Set FIeld [Apppointments::ApptID $ApptID]
ApptID must be a field that uniquely identifies one record in the appointment table.
For the above use, there's no need to read further, but GTRR has many options. If you want to learn more, check out this link:
That worked great - thanks!
One other related question. When I display my appointment data in the portal, I want this data to be read only - prevent editing of the data. Any easy way to do this?
Also, in my portal I always get a new or additonal row. Meaning, if this patient has three appointments, I get those three appointments and what looks like a blank row (a fourth record). How can I prevent this last row?
To make a field read only, change its behavior so that it can only be entered in find mode. In earlier versions of filemaker, this is in Field/Control | Behavior. In filemaker 11, this is an option on the Data tab of the Inspector.
To remove the extra blank line, Open Manage | Database | Relationships.
Find the Relationship line linking your layout's table occurence to the portal's table occurrence and double click it.
Clear the "Allow creation of Records via this relationship" for the Portal side of the relationship.
Thanks - that worked great!