Filemaker doesn't handle finds that way.
When you enter find mode and specify criteria for the find in a portal, you are telling FileMaker "Find all records in the layout's table that have at least one related portal record matching this criteria." Once it finds those records in the layout't table, you are returned to browse mode where all related records--not just those matching the search criteria--are are displayed.
You have two options:
- Search a layout based on your car and driver table.
- Create a filtered portal where your specified search criteria can also be used to filter the portal to only show matching portal records--this may or may not be easy to do depending on your criteria and what version of FileMaker you are using.
PhilMod: I am actually trying to do your option #2. I am using Filemaker 11 ProAdvanced and the filtered portal option is new to me. The search is relatively simple: if I am in my Location layout with the CarDriver portal which at the time is showing all CarDriver records linked to that Location, I would like to do a find, lets say on the "Car Name" field in the portal, and have the portal then just show those linked records for that Car Name.
If you define a field, (often a global field) called SelectedCarName, You can use this portal filter:
IsEmpty ( SelectedCarName ) or ( SelectedCarName = Portaltable::CarName )
This can be a field formatted with a drop down of your car names so that you simply select a name from the list to limit to just records with that car name. You have to refresh the window after you change the selection, so I'd add a script trigger to perform this script step: Refresh WIndow [flush cached join results] to get the portal to update.
If you use a script to find your records, you can search for all layout records with the specified car name and then the script can update the SelectedCarName field and refresh the window all in one operation.
I know this is an old post but I just came in to say thank you PhilModJunk for all your good explanations. You have helped me a lot and this script to search in portals is really cool.
Posts more than three months old no longer appear in the Recent Items section when a new post is made. I only found this post because I happened to scan down through the lower list and didn't recognize this post.
But if you'd like to see more examples of using a portal for finding and selecting values you might examine:
Hey brother, thank you so much for sharing this with me. I will review the file ASAP and let you know any feedback. One more time; thank you so much for helping us, I really appreciate it.