The FileMaker Get(SortState) Function

From Dwayne Wright PMP, PMI-ACP
Certified FileMaker Developer

TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

FMP Version: FileMaker 7 And Higher
Returns A Number Result

The Get(SortState) function will return a numeric result corresponding to the fact that a set of records is sorted, semi-sorted or not sorted. Semi-sorted is a condition where a found set of records was sorted but new records have been added. So all but the new records correspond to the last sort order.

If the found set of records is sorted, it will return a 1
If the found set of records is not sorted, it will return a 0
If you see a 2, that means the found set of records is semi-sorted.

Now with FileMaker 10 (and higher), this function is likely used differently than previous versions. This is because FileMaker 10+ will automatically sort found sets of records when new data is added or edited!

Still, the Get(SortState) funtion is a nice feature and one way to key a conditional formatting feature to give the user a visual indication if a found set is sorted or not!