You could investigate using the onLayoutEnter script trigger and the Sort records script step.
See the attached suggestion file.
Consider that automatically changing the found set in this manner may make it more difficult for your user to work with your solution if they are forced into a found set instead of having the ability to choose their own found set.
Better example attached
sort.fmp12.zip 65.0 K
1 of 1 people found this helpful
Before you work on sorting records, you really need to take a look at using key value relationships (instead of relating based on company name).
Here is FileMaker's documentation on it:
And there are a myriad of helpful how-to videos:
Also, looking at your relationship structure, the "to meet" table occurrence doesn't really appear to serve any purpose, as it's just showing the same data and relationship as the "connections" table. The relationship graph isn't really the place for sorting and filtering data on layouts, unless you plan on using portal objects to display your data.
Getting back to your ordering question, records are always presented in natural order (the order they were created) for the table that the layout is based on. This will be true for anytime the database is opened for any user, the default sort order. For any other sort order, you have to force a sort via a script, or manually (press the sort button in the top toolbar, or cmd/ctrl + S).
Forcing a sort script to run could be possible by using an OnLayoutEnter script trigger. Which would fire off when you entered your "Connections" layout.
Documentation here: Understanding and using Script Triggers | FileMaker
Thank you. I'm still a novice and am figuring things out.
I made two tables because I didn't want the records from one table to appear in another layout. It was the only way I could figure out how to fix the problem. If there is another way please tell me.
I know it is possible to have a dropdown list with fields, and when you click an option in that field it will automatically sort into the proper order based on that selection. I have a database that was not built by me that does it. But I can't figure out how.
I made two tables because I didn't want the records from one table to appear in another layout.
Look into found sets and related sets of records.
You can limit what records appear on a given layout by performing a find. You can also use a portal to display a set of related records and then the relationship and any portal filter you define control which records are listed in the portal.
updated to include a sort control on the layout. The next step to flesh this out a bit more is to include an ASC/DESC sort order control and appropriate branching in the triggered script
sort.fmp12.zip 65.8 K