Level: Intermediate

Sorting on a Field Rep > 1

Recently, in a virtual list report, I had a need to sort on rep number 2 of a repeating field called cell_text_r.


FileMaker does not offer an obvious way to script a sort on a field rep > 1, and I had worked around the problem in the past by…

A. Defining some special non-repeating fields in my virtual list table like so


B. Populating a variable, for example $vText1 with “cell_text_r[2]”, and then

C. Scripting my sort on virtual_text_1.

Does it work? Yep. Does it seem needlessly clunky? Yep.

At any rate, it turns out the above is not necessary (unless one is planning to sort on more than one repetition at the same time). To script a sort on a field rep > 1…

1. Place it on a layout.


2. Return to browse mode, and if in table view, manually sort on the field like so…


…otherwise, control- (on Mac) or right- (on PC) clicking inside the field to display a context menu and sort accordingly.


3. Add the “Sort Records” step to the script, making sure “Specify sort order” is checked.


Long-time FileMaker users will recognize this trick from the old days when all scripted sorts needed to be “memorized” in a similar manner.

2 thoughts on “Sorting on a Field Rep > 1”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.