You have two easy choices: sort the relationship or sort the portal on the layout.
To sort the relationship, in the relationship graph double click the relationship indicator on the line between the tables. In the next window, choose the Sort option at the bottom on the side of the table you want to sort and select the fields.
To sort the portal, in the layout double-click the portal, then select the Sort portal records option and specify the fields.
What do you mean by "selected record". If you are "viewing" a portal - no portal record is selected. Are you trying to perform some action based on a specific record in the portal? If so - you need to "select" the record first, otherwise, FM will return the first record in the relationship. If you only need to select the most recent record, then Michele's sorting suggestion should do the trick. But if you need to be able to select various rows for this purpose, then you need to do something else.
If you are trying to "select" a portal record and then perform an action, you can capture the portal row number or the record ID of the related record - and then use that information to "select" the record you want ot interact with.
Give us some more info and we can give you a more specific response.
I'm not entirely sure if I have used the correct terminology Karen.
When viewing a list of all records (is that a portal?), I would like to be able to choose the method in which a record is selected by default. Sorting seems to have no effect. When I view the records for this year in date order, rather than seeing the first record, the list is somewhere in the middle, with the first record that was entered for the year selected (even though it isn't the first record in date order).
So, a portal is a layout object that displays records from a related table. If you are viewing a list of all records in the current table, that would just be a list view.
It sounds like what you are describing is designated the current active record in the list view.
When you go to a layout table for the first time (whether form view or list view, doesn't matter ) FileMaker by default will go to the first record in the found set. If you sort the records, you stay on the record you were originally on in the sort order. This is a feature.. ;-) So that you don't lose your place when sorting..
If you want to have a specific record as the current active record after sorting, then you need to write a script to do that. Scripting can be very simple, so no need to be afraid of it. For example, your date order script would be something like,
Sort Records [by selected date order]
Go to Record/Request/Page [First]
Then you can attach that script to a "Sort" button OR leave it in the Scripts menu with a key command OR use a script trigger so that it fires every time you go to that layout. And there are many other ways to activate a script.
Read the section in the FileMaker Help files on scripting, and I recommend the FileMaker Training Series - it will walk you through the terminology and basic to advanced functions, as well as provide many sample files so you can see how things work.
Hope that helps,
Wow, that was so easy once you understood what I was talking about. Thanks for your time and persistance Karen!
So glad I could help!!