- Who: Anyone who uses sorting and wants that sort to stay consistent.
- What: How to maintain sort order (even when sort value in field changes).
- With: FileMaker 12+
- Why: Sometimes you don’t want the record you are on to change it’s order in the found set when you update the record.
Problem
It’s pretty common to sort a found set so that the user can go through the records in an order that makes sense. In my in-house position, we often need to sort a found set based on the patients’ names and birth dates. The staff will then go through the patient records and verify that the spelling and birth date of each patient matches what their insurance company expects. Sometimes they need to change a first name (like Mike to Michael) or even a last name to append a hyphenated second last name. This can be especially problematic when the appended last name causes the patient’s order in the found set to change.
For example, lets say we have 10 patients in the found set sorted by last name, then by first name. If the first patient’s last name is “Anderson” but we change it to “Smith-Anderson”, the default behavior is to re-sort the found set but stay on that patient. Since “Smith-Anderson” comes much later in the alphabet, it’s likely that this patient will now be somewhere late in the sort order (let’s say it is now the 8th record in the sorted found count instead of the first record). If the user isn’t paying attention, they might not realize the sort order just changed and they are now on the 8th record! They might go through and check the last couple of records, but they actually skipped records 2-7!
Solution
It turns out that FileMaker has an often overlooked solution to this! In the “Sort” dialog, there is a little check box labeled “Keep records in sorted order”. If you simply uncheck this box, your original found count sort order will stay the same even if you change the value in the field you sorted by!
Hope that helps!